TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 02-29-2008, 05:28 AM   #1 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default 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.
__________________
VillageIdiot can have my babbies ;d

Last edited by Orc : 02-29-2008 at 06:11 AM.
Orc is offline  
Reply With Quote
Old 02-29-2008, 06:51 AM   #2 (permalink)
The Contributor
 
DeMo's Avatar
 
Join Date: Jan 2008
Location: Brazil
Posts: 77
Thanks: 14
DeMo is on a distinguished road
Default

What is the data type of the column where you're storing the file? Are you using a BLOB?
Send a message via ICQ to DeMo Send a message via MSN to DeMo Send a message via Skype™ to DeMo
DeMo is offline  
Reply With Quote
Old 02-29-2008, 07:09 AM   #3 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default

Quote:
Originally Posted by DeMo View Post
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.
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote
Old 02-29-2008, 07:43 AM   #4 (permalink)
The Visitor
 
Join Date: Sep 2007
Posts: 2
Thanks: 0
sandykadam is on a distinguished road
Default

Hi,

Please check this link might be usefull. PHP form, Image upload. Store in MySQL database. Retrieve
sandykadam is offline  
Reply With Quote
Old 02-29-2008, 07:46 AM   #5 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default

Quote:
Originally Posted by sandykadam View Post
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.
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote
Old 02-29-2008, 07:49 AM   #6 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default

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.
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote
Old 02-29-2008, 07:52 AM   #7 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default

Yep, escaping the strings fixed it.
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 11:27 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design