mike12255 Posted January 21, 2011 Share Posted January 21, 2011 ive looked at this for a while now and im not sure whats wrong, the error occured when i entered $cat and catagory into it, without that the query works perfectly fine, any help appreciated. <?php INSERT INTO newnotes (uid, name, catagory, location) VALUES ('1', 'test', '1001 Laws - Polceing', '/home/mikeh/public_html/uzEr Upl0ds/Alyssa O'Leary.doc') the <php tag is only to give color and make it less dull the query is from a die($query) statment Link to comment https://forums.phpfreaks.com/topic/225157-whats-wrong-with-my-query/ Share on other sites More sharing options...
ruddie Posted January 21, 2011 Share Posted January 21, 2011 I think it is because of the ' before Leary. This will place /home/mikeh/public_html/uzEr Upl0ds/Alyssa O in the location value and then simply place Leary.doc') after it, which should be the reason of your error. To fix it, I guess you could put it in a variable? Like: $filename = "/home/mikeh/public_html/uzEr Upl0ds/Alyssa O'Leary.doc" I think that should work (not certain) Link to comment https://forums.phpfreaks.com/topic/225157-whats-wrong-with-my-query/#findComment-1162866 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.