TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   General (http://www.talkphp.com/general/)
-   -   insert images into the database, depends on their file size or..? (http://www.talkphp.com/general/2373-insert-images-into-database-depends-their-file-size.html)

Orc 02-29-2008 05:28 AM

insert images into the database, depends on their file size or..?
 
I made a 'successful' file to database upload, but.. But the file was small, and it was uploaded successfully, I then uploaded one that was about 1.00 KB ( the small file was around 1 byte -_- ), and that never uploaded, PLEASE HELP!

Update: It's only doing it to be files that are smaller bytes than kilos.

Code:


You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'uŒYŽšn›̳\Œ4yXEž''žŸOT$% S82׫?~a:SN+m>ƒd–' at line 1

Heres even an error I got from the mysql.

DeMo 02-29-2008 06:51 AM

What is the data type of the column where you're storing the file? Are you using a BLOB?

Orc 02-29-2008 07:09 AM

Quote:

Originally Posted by DeMo (Post 11689)
What is the data type of the column where you're storing the file? Are you using a BLOB?

Yep, suppose to anyways. eg its not a longblob or medium, just regular.

sandykadam 02-29-2008 07:43 AM

Hi,

Please check this link might be usefull. PHP form, Image upload. Store in MySQL database. Retrieve

Orc 02-29-2008 07:46 AM

Quote:

Originally Posted by sandykadam (Post 11691)
Hi,

Please check this link might be usefull. PHP form, Image upload. Store in MySQL database. Retrieve

I checked it out, I just need some mysql support it seems, I actually got the images uploading, but when it goes to something greater or equal to 1.00 KB, it doesnt upload.

Orc 02-29-2008 07:49 AM

I think it seems I needed to add the escape string, which I did before, but removed it due to changes. -_- I have to stop making mistakes and sometimes 'bad' changes.

Orc 02-29-2008 07:52 AM

Yep, escaping the strings fixed it.


All times are GMT. The time now is 07:22 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0