Jump to content

Can't Use WHERE clause with LIMIT???


centenial

Recommended Posts

Hi,

I'm having trouble with an SQL query:

SELECT * FROM images WHERE userid = '1' LIMIT 0,16

This returns 0 Rows. It should be returning up to 16. When I delete the "WHERE" clause, it returns 16. And when I delete the limit clause it returns every row belonging to user 1. But when I use them together it returns nothing.

Can anyone help me? Can't you use a LIMIT clause with a WHERE clause?

Thanks,
Link to comment
https://forums.phpfreaks.com/topic/36358-cant-use-where-clause-with-limit/
Share on other sites

Archived

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

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