Bug #1386 | IMAGE data type | ||
---|---|---|---|
Submitted: | 23 Sep 2003 19:27 | Modified: | 24 Sep 2003 11:50 |
Reporter: | Daniel Brown | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: User-defined functions ( UDF ) | Severity: | S4 (Feature request) |
Version: | OS: | ||
Assigned to: | CPU Architecture: | Any |
[23 Sep 2003 19:27]
Daniel Brown
[23 Sep 2003 19:46]
Paul DuBois
You don't need an IMAGE type to accomplish what you want. Use a BLOB column rather than a TEXT column to store binary data such as images. The only thing you need to make sure of is that you properly escape your data before inserting it. (For example, by using mysql_real_escape_string() if you're using C.)
[23 Sep 2003 23:16]
Daniel Brown
Hey must admit i was supprised that someone responsed :) thanks. anywho back to business, im using the blob field, the binairy data im uploading is just a jpg file, nothing flash, however when trying to putt it out of the database it screws up, becuase there is \n ,\t \0 in there, etc, and mysql pulsl a blob out as a string, hence my problem, inserting can do i just do load_file, but pulling it out is a hole different story. im currently using C# / VS.NET 2003 to develop in ( creating a website ), so no real way for me to access the mysql C api, just basicly the myodbc, etc which i havvnt had much experiance in. thanks again :) Regards Daniel
[24 Sep 2003 11:50]
Lenz Grimmer
Sorry, but the bug system is not the appropriate forum for asking support questions. Your problem is not the result of a bug. For a list of more appropriate places to ask for help using MySQL products, please visit http://www.mysql.com/support/ Thank you for your interest in MySQL. As this is not a bug in MySQL, I will close this report. I found the following two articles that might be helpful for you: "Accessing MySQL BLOB columns using Visual Basic 6" http://www.vbmysql.com/articles/blobaccessvb.html "How to store images directly in the sql database" http://www.phpbuilder.com/columns/florian19991014.php3