Jump to content

Help with query


Stephen68

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.