Jump to content
  • 0

SQL ERROR.. Why ?


none

Question


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  84
  • Reputation:   1
  • Joined:  11/14/11
  • Last Seen:  

Hi everybody !

I've some error with mysql request :

.@nb = query_sql("select id,cmd,char from `CMDIST` ORDER BY `id` DESC LIMIT 1", .@id, .@cmd$, .@char$);
(09/02/2014 17:55:11) [ SQL Error ] : DB error - 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 'from `CMDIST` ORDER BY `id` DESC LIMIT 1' at line 1
(09/02/2014 17:55:11) [ Debug ] : at script.c:16265 - select id,cmd,char from `CMDIST` ORDER BY `id` DESC LIMIT 1
 
Another error with this sql:
query_sql("SELECT COUNT * FROM `auction`",.@count );

Can you explain me where is the error ?

Thx a lot !

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  1096
  • Reputation:   344
  • Joined:  02/26/12
  • Last Seen:  

.@nb = query_sql("SELECT  `id`,`cmd`,`char` FROM `CMDIST` ORDER BY `id` DESC LIMIT 1", .@id, .@cmd$, .@char$);
query_sql("SELECT COUNT(column name) * FROM `auction`",.@count );

char - reserved name of MYSQL

Edited by Anacondaqq
Link to comment
Share on other sites

Join the conversation

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

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

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