Re: big long strings and biggest query solved


Subject: Re: big long strings and biggest query solved
From: Grant Stockly (grant@stockly.com)
Date: Tue Jun 04 2002 - 01:10:16 AKDT


At 10:17 PM 6/3/2002 -0800, you wrote:

>I have a situation in mysql where I need to throw around strings of up to
>16MB. For now, lets just limit it to 2150945
>
>Does anyon know of a set of C routines (strlen, sprintf, strcpy, strcat)
>that will work with large strings? I get garbage in the megabyte range.

My current solution is to write what I want in order to a separate file,
the load that file into one giant string.

"INSERT INTO song (ID, title, mpeg) VALUES
(\'1\',\'abc\',\'"+binary_mpeg_data_here+"\')"

As long as my communication buffer is large enough, it takes it... Problem
solved...for now!

I found my other problem, it was something TOOO simple. I'd forgotten to
run "mysql_real_escape_string" on the thing...

This was one of my earlier nights, 1Am. ; )

Grant

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Tue Jun 04 2002 - 01:11:01 AKDT