Posted 05 October 2006 - 08:47 PM
Posted 05 October 2006 - 09:11 PM
$result = mysql_query("SELECT * FROM calendar where num = ".$_GET['num']);
$row = mysql_fetch_array($result);
I'm sure it's getting the correct row, because it's displaying other data from it, but it won't display anything from the description filed(which is a blob data type).
Posted 05 October 2006 - 09:19 PM
There are so many different field types in MySQL that cater for all sorts. Me personally, i've only probably used about 6 or 7 different ones ever (less if you dont consider the variants - SMALLINT, INT, BIGINT, etc). Some of the others I will probably never have a use for.
Getting data from a blob field is no different really from any other field in terms of getting data from it. A normal SELECT will suffice. Whilst I can't honestly say I know exactly the full/proper use for the blob field, i've always used it to store binary data. Anything that is generally entered via a <form> can be put in the basic types - VARCHAR (or CHAR), INT (or its smaller/larger variants), TEXT, etc. a textarea would be suited to putting data into a TEXT field, not a BLOB.
hope that makes sense
I say old chap, that is rather amusing!
Posted 05 October 2006 - 09:27 PM
Posted 05 October 2006 - 09:53 PM
perfectly, and after posting I've been looking around more on google and playing with my code, and i got it to display all but the first line using a varchar field, and changing it to nl2br($row['description']). But now my question is why is it now displaying the first line?
I feel stupid now, I just looked at the source code for the page and the browser is interperting it wrong was my problem.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users