I’m working on a small banner-rotation script that loads a random banner from the database. I am tracking impressions in the database and would like to know if I can select a random record and update its impression-value in a single query, or would I need to select a random record, and then update based upon the record pk. Using MySQL.
I’m working on a small banner-rotation script that loads a random banner from the
Share
This cannot be done in a single query. Your best bet is to put this logic in a stored procedure.