On Sunday, January 26, 2003, at 06:26 pm, Jason Wong wrote:
You're not doing anything with $tempQuery1 & $tempQuery2 this is complete
nonsense ;-)
Bowing obsequiously, suitably chastened, I read on . . .
This is getting closer. Unfortunately you haven't been reading the manual.
mysql_query() returns a "resource ID". See examples in manual for details on
how to properly query and return results from a db.
Knuckles recovering from another knock, I read further . . .
Couldn't the above be condensed to: SELECT presenter FROM presenters ORDER BY date DESC LIMIT 1;
Much neater indeed. Elegant, even.
Which means you can get by with 2 queries:Code successfully incorporated and working as intended. Thanks for the help.
$query = "SELECT presenter FROM presenters ORDER BY date DESC LIMIT 1";
$result = mysql_query($query);
$row = mysql_fetch_assoc($result);
$presenter = $row['presenter'];
You can now use $presenter in your last query
All code untested, handle with care.
Jim MacCormaic
Dublin, Ireland
iChat/AIM : [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php