Jump to content

Recommended Posts

SELECT i.*, u.username, u.email, g.gallery_name, CONCAT('http://tutaka.com/images/',u.username,'/', i.name, '.', type) AS image_url, CONCAT('http://tutaka.com/thumbs/',u.username,'/', i.name, '.jpg') AS thumb_url FROM images i LEFT OUTER JOIN galleries g ON i.gallery_id=g.gallery_id, users u WHERE i.user_id=u.user_id AND i.user_id=3 ORDER BY i.uploaded desc LIMIT -5,5

 

 

mySQL Says: 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 '-5,5' at line 1

 

 

I can't figure what the error is all about?

Link to comment
https://forums.phpfreaks.com/topic/36860-sql-error-need-help/
Share on other sites

I believe there was a time when you could use a negative offset -- so that you could start at record 20 but get _all_ of the rest of them... instead of what you currently have to do, which is specify a ridiculously large integer just to be sure.

Link to comment
https://forums.phpfreaks.com/topic/36860-sql-error-need-help/#findComment-177300
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

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

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.