Jump to content

One More Sql Error..


Piyush

Recommended Posts

my access table structure is like this....id(autoincrement),title(text),filename(text),ext(text),by(Number),ts(number),description(text),nodownloads(number)My query was like this....INSERT INTO 'download' ('title','filename','ext','by','ts','description','nodownloads') VALUES ('Ultra Surf','U992','exe',1,1263571417,'Proxy Tools',0)and i got error..Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error in query. Incomplete query clause., SQL state S1000 in SQLExecDirect in C:\Inetpub\wwwroot\root\index.php on line 9Please help me

Link to comment
Share on other sites

Hi, the only posible error i see is that BY is a sql keyword, that might be a problem, but i'm kind of guessing. :)
I have now change the feild name from 'by' to 'from'and so the query became thisINSERT INTO download (title,filename,ext,from,ts,description,nodownloads) VALUES ('Ultra Surf','U992','exe',1,1263845361,'',0)but now the error isWarning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement., SQL state 37000 in SQLExecDirect in C:\Inetpub\wwwroot\root\index.php on line 10
Link to comment
Share on other sites

What's with all the keywords? You haven't used a select statement?SELECT * FROM ...How about 'author', or 'uploader', or 'posted_by' or some other name that's not in this list:http://office.microsoft.com/en-us/access/HA100306431033.aspx
Oh....sorry...i was not able to recognize that.thx.iwill try..
Link to comment
Share on other sites

Archived

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

×
×
  • Create New...