Hello everyone, I have a doubt with a quote script I have. I have a table with all the quotes, but my problem is when I want to select one, I can do a query like this
SELECT max(id) as NoQuotes FROM quotes
to obtain the last id inserted, and then do a random (1, NoQuotes) to select one id and then do a
SELECT quote, autor FROM quotes WHERE id = $quoteSelected
the other way I tought was to have a file that have the latest id inserted and then just avoid using the first query, I dont know which method take, if someone has a nother idea please tell me.
H.