I'm trying to store the results of a simple query as a variable.
This query gives me the photoID number of the most recent photo I uploaded:
SELECT photoID FROM photos ORDER BY photoID DESC LIMIT 0, 1"
I want to then take that photoID number and insert it into another table with a few other values from a form. I've tried storing the result of the query above as a $variable and then trying to insert that $variable, but it doesn't work. How should I go about doing this?
Thanks for helping this very frustrated newby!