Topic: Quick help with using an SQL query please
Just a simple, stupid little question that I can't seem to figure out the answer to -
I've got this query that I'm using in profile.php:
$result = $db->query('SELECT id FROM '.$db->prefix.'posts WHERE poster_id = '.$id.' AND posted = '.$user['last_post']) or error('Unable to fetch last post ID', __FILE__, __LINE__, $db->error());
My question is simply: how do I reference the information that query returns in PHP as a variable. It's probably obvious to a whole lot of people here, but I'm essentially much learning PHP as I go, and thus this is beyond me (and yes, I've tried to discover this myself on several occasions, with no success).
Thanks in advance for your help.