I am having trouble with the following MYSQL query and are hoping that there is someone that can help me with it.
Here is the query:
SELECT * FROM dbcasino_db22.tb_content WHERE content_real_folder = 'foldername/' AND content_no < 5099
This query works but gives me all the records smaller than 5099 that match the content_real_folder - I would actually just want to get the Maximum Result smaller than 5099 and not have the first record matching the content_real folder
My quess is that the end query would look like this - but I am not having JOY with it
SELECT * FROM dbcasino_db22.tb_content WHERE content_real_folder = 'foldername/' AND content_no < 5099 HAVING MAX(content_no)
If there is anybody who could help - it would be much appreciated
Thanks