Help - Search - Members - Calendar
Full Version: SQL error:1064
HTMLHelp Forums > Programming > Databases
drew618
here is the whole problem:


MySQL error: 1064
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 '0h' at line 5
Query: SELECT a.*, u.username FROM Forums_announcements a LEFT JOIN Forums_users u ON u.uid=a.uid WHERE a.startdate<='1198023690' AND (a.enddate>='1198023690' OR a.enddate='0') AND ((fid='1' OR fid='6') OR fid='-1') ORDER BY a.startdate DESC LIMIT 0, 0h



any help???
Darin McGrew
I moved this to the Programming > Databases forum.
Brian Chandler
QUOTE(drew618 @ Dec 19 2007, 09:27 AM) *

here is the whole problem:


MySQL error: 1064
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 '0h' at line 5
Query: SELECT a.*, u.username FROM Forums_announcements a LEFT JOIN Forums_users u ON u.uid=a.uid WHERE a.startdate<='1198023690' AND (a.enddate>='1198023690' OR a.enddate='0') AND ((fid='1' OR fid='6') OR fid='-1') ORDER BY a.startdate DESC LIMIT 0, 0h



Uh, no, that's not the whole problem - we need to see what you actually have written in your program. Does your query stop at '0h'? What does 0h mean - it looks suspicious. Have you looked at the bit of the MySQL manual that explains how to do what you're trying to do? My Quick Ref gives

LIMIT [offset,] rows

which I think means that LIMIT 4,3 would skip the first four rows then give you three rows. I don't see that 0, 0h makes any sense here.
viju
Thanks for this valuable definition.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.