clem_c_rock 0 Newbie Poster

Hello,

I'm having a problem w/ the LIMIT clause when I'm using this CASE statement.

This is working like a dream:
SELECT * FROM table ORDER BY CASE table_id WHEN 54 THEN 0 ELSE 1 END, table_id LIMIT 50

Only problem is
I would like to do a limit start, stop statement at the end rather than a

limit stop statement.

How would you do this:

SELECT * FROM table ORDER BY CASE table_id WHEN 54 THEN 0 ELSE 1 END, table_id LIMIT 50, 50

Once I add the second part of the limit, I lose the idea of displaying table_id=54 first.

Thanks a lot!

Clem

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.