I'm using MySQL 5.1 with PHP and I was wondering if it would be possible to run a query that will select a specific row using the primary key, but if it doesn't exist, to return a different one.
For example: select * from table1 where id="a" else id="b"