Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

SQL syntax erorr [HELP]

Asked Modified Viewed 2,602 times
K
Kyo
K
Kyo 10
  • Newbie, joined since
  • Contributed 2 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
asked
Newbie

hello,

I've erorr in my web at downloads categorys cat, this is it:
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 'LIMIT 0,15' at line 1You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0,15' at line 1


I was searching how to fix this problem, but nowhere found the answer.
I hope you can help me.

Thank's Tom,
0 replies

3 posts

W
wibix
W
wibix 10
  • Member, joined since
  • Contributed 73 posts on the community forums.
  • Started 15 threads in the forums
answered
Member

if u want to know the sql statement that caused this error open your maincore.php (make copy before) look for function dbquery and modify it like this:

function dbquery($query) {
  $result = @mysql_query($query);
  if (!$result) {
    [color=blue]echo "#$query<br/>";[/color]
    echo mysql_error();
    return false;   
  } else {
   return $result;
}
}


your output should look like this:
#SELECT * FROM .........." then the sql error msg.
post it here.
Edited by wibix on 12-01-2006 23:43,
0 replies
K
Kyo
K
Kyo 10
  • Newbie, joined since
  • Contributed 2 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

#SELECT * FROM fusion_downloads WHERE download_cat='2' ORDER BY LIMIT 0,1000


so, how fix it? :]
0 replies
W
wibix
W
wibix 10
  • Member, joined since
  • Contributed 73 posts on the community forums.
  • Started 15 threads in the forums
answered
Member

before you read below... did you do any modifications yourself? does this problem occur everything, in each category or in one specific? check your sorting settings for cats - this is the problem here.

missing ORDER statement. order by what? e.g.

SELECT * FROM fusion_downloads WHERE download_cat='2' ORDER BY [color=blue]download_datestamp DESC[/color]  LIMIT 0,1000
0 replies

Category Forum

Bugs and Errors - 6

Labels

None yet

Statistics

  • Views 0 views
  • Posts 3 posts
  • Votes 0 votes
  • Topic users 2 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet