Mickael...

You'd get the information just like writing any other SELECT statement. The
problem comes when you're trying to view the data. It's a blob which is made
to store files, not text. It's possible that the previous developer stored
text in there, in which case, you could just output it to the page and you'd
be set.

In fact, I'd do that to start...it'll tell you right away what information
is stored in that column. Select one record and output it. If it's plain
text, then problem solved. If it's gibberish then you'll need to come up
with a way to restore the file back to whatever it was, image, DOC file,
etc.

Here's a few links that I found...it looks like lots of other people have
the same problem and no on listens to the correct answer. Do NOT store
images or files in the database...just store the PATH to the file:

http://www.experts-exchange.com/Web/Web_Languages/PHP/Q_21049962.html

http://www.devarticles.com/c/a/MySQL/Blobbing-Data-With-PHP-and-MySQL

http://groups.yahoo.com/group/coldfusion-howto/message/33739


<!----------------//------
andy matthews
web developer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--------------//--------->

-----Original Message-----
From: Mickael Elmalem [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 25, 2005 10:04 AM
To: CF-Talk
Subject: Re: Problem with MySQL


Hi Andy,

I looked at your page.  But could not see how you actually write a select
statement to view the data.

>BLOB fields aren't text, they hold raw data such as an image, DOC file or
>something else. They're roughly similar to a TEXT field in that they hold
>the same amount of data.
>http://dev.mysql.com/doc/refman/4.1/en/blob.html
>
><!----------------//------
>andy matthews
>web developer
>ICGLink, Inc.
>[EMAIL PROTECTED]
>615.370.1530 x737
>--------------//--------->
>
>-----Original Message-----
>From: Mickael Elmalem [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, October 25, 2005 8:40 AM
>To: CF-Talk
>Subject: Problem with MySQL
>
>
> Hello All,
>
>I have a problem with an app that I inherited that was not working
properly.
>The database is MySQL but they want to convert it to a new database after
>extracting the old data.  I do not have much experience with MySQL and I am
>stumped with one field that they have in the database.
>
>When I view the database via PHPMyAdmin I see that the field in question
has
>a type of Blob with an Attribute of Binary.  This field as per the site is
>supposed to house text longer than a few character so similar to the memo
>type in Access.  When I browse the database throught the MyAdmin it says
the
>the contents of the field are [BLOB - 1 Bytes] or [BLOB - 20 Bytes]
>
>How do I extract that information from the as the raw text from this type
of
>field?  I bought a MySQL to MSAccess converter and does the trick no
problem
>expect for this field.
>
>Any Ideas?
>
>Thanks
>
>Mike



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222198
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to