Hi,

I can store and retrieve binary data in the form of image or sound files.
However, I wanted to store up to say, 10,000 bytes of textual data.  Since
varchar has a 255 byte ceiling I thought that mediumblob might be nice for
this.   I can store the stuff as mediumblob without difficulty.

However, when I try to retrieve the mediumblob (just character data
originally) via PHP4, I tried this:

$sectionText1=mysql_query(" select sectionText from sectionbinaries where
TestID='$test' and section='$section' ");
$section1=mysql_fetch_row($sectionText1);


This section1 array gives me a raft of stuff, including a lot more than I
want.   So I looked in the manual and found that:
   "mysql_query() cannot be used for queries that contain binary data; you
should use mysql_real_query() instead.  "


SO I switched to:
$sectionText1=mysql_real_query(" select sectionText from sectionbinaries
where TestID='$test' and section='$section' ");
$section1=mysql_fetch_row($sectionText1);

and received the following error:
Fatal error: Call to undefined function: mysql_real_query() in data.php3 on
line 210


Can anyone point me in the correct direction?

1.  It is character data originally -- should I be using a mediumblob format
to get 10,000 bytes or so into storage?
2.  What function might I use (and how can I use it) to correctly display
the data if stored as something other than varchar?

Thanks for your time!

-Warren






---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to