Matthew Boehm wrote:
Hey guys,
 (Why is there no C API specific list?)

I want to write a C application that can take some audio file, store it in
MySQL, then at a later date/time (upon request) pull from db and write to
temporary file to be streamed.

I've got the storing portion of the code down. The problem I have is, how do
I SELECT out the audio and store it to a file on the local disk?

2 solutions for it. you can retrieve the data : mysql_query(mysql_conx, "SELECT audio FROM ..."); myres = mysql_store_result(mysql_conx); myrow = mysql_fetch_row(myres); audiodata = stripslashes(myrow[0]); (providing you escape characters); then the usual C function should do the trick (fopen, fwrite...)

or SELECT INTO OUTFILE (check the manual, I don't know the details ;) to store the file on the server.

--
Philippe Poelvoorde
COS Trading Ltd.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to