Using LIMIT and WHERE clause

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
GeXus
Forum Regular
Posts: 631
Joined: Sat Mar 11, 2006 8:59 am

Using LIMIT and WHERE clause

Post by GeXus »

Is it posible to use a LIMIT with a WHERE clause? This is my code and it works fine, just not with the where..

Code: Select all

SELECT * FROM products LIMIT $limitvalue, $limit WHERE title LIKE '%$q%'
Thanks!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Limit clauses follow where clauses. Not vice versa.
Post Reply