Jump to content

Whats wrong with my query


mike12255

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.