Jump to content

Recommended Posts

I'm getting an error trying to run this query, was wondering if somebody could peek at it and let me know what

is wrong with it. Is it the browser agent type that is messing it up?

 

INSERT INTO logs (' ','2009-10-10','127.0.0.1','innovate','Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)')

 

Thanks for any help that I might get, funny thing is I thought it was working before lol..

 

Stephen

Link to comment
https://forums.phpfreaks.com/topic/177214-help-with-query/
Share on other sites

sorry I normaly do post everthing

 

 

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 ''','2009-10-10','127.0.0.1','innovate','Mozilla/5.0 (Windows; U; Windows NT 6.0;' at line 1

 

 

I took out the space out but for some reason there looks to be another quote, that might be part of the

error message though. The first field is autoincrement.

Link to comment
https://forums.phpfreaks.com/topic/177214-help-with-query/#findComment-934492
Share on other sites

I fixed it but still don't know what was wrong with the first version. I change the query to adding field names

and then values.

 

INSERT INTO logs (field,field,field) VALUES ('value','value',value')

 

It work's not but if you can think of why the other way didn't I surely would like to know.

 

Stephen

Link to comment
https://forums.phpfreaks.com/topic/177214-help-with-query/#findComment-934496
Share on other sites

Like it's been said above it's more than likely the auto_increment. did you specify the fieldname and value for that in your latest query that is running? if you have an auto increment field it's always best to use NULL for it's value without any quotation marks

Link to comment
https://forums.phpfreaks.com/topic/177214-help-with-query/#findComment-934958
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.