I have a query like
SELECT *
FROM `mytable`
WHERE
(`status` LIKE 'active%' OR `status` LIKE 'featured%')
AND `views` < `tviews`
AND `id` > 4
ORDER BY RAND()
LIMIT 1;
Now if NO rows match that query I want it to return ROW where id
=2
How is this done. note I want the whole row at position id=2
Ps. does using RAND() matter if the table contains only max 100 rows, just new to mysql dont want to do anything unless necessary
And no its not a duplicate question, that other one i read and its not the same. That returns a default value like "Peter" or 0, i want it to return a full ROW not a single value! So thanks for reporting and stopping me from asking questions