Hi all,
Here's my situation: I want to SELECT all entries from a database WHERE id = $id. But I want the results to be listed in a certain priority. If, criteria = $criteria, then I want those results displayed first. Otherwise, I just want to keep displaying the rest of the rows.
My question is this: will this solve my problem?
SELECT field1 WHERE (criteria=$criteria AND id = $id) OR id=$id LIMIT 5
Will the query look at the () first? If not, is there another way to do this without splitting this into two separate queries?
Thanks,
Michael