[thelist] pulling a single sql result in php
Tom Dell'Aringa
pixelmech at yahoo.com
Fri Nov 15 16:40:01 CST 2002
Hi,
Ive been reading that normally for a result set in PHP you pull the
array:
$result = @mysql_query("SELECT categoryID FROM category WHERE
category = '$newCat'");
$row = mysql_fetch_array($result);
then get your values like
$myvar = $row['categoryID'];
If I am only getting one result, is there a simpler way than pulling
the array?
TIA
Tom
=====
var me = tom.pixelmech.webDeveloper();
http://www.pixelmech.com/
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]
__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com
More information about the thelist
mailing list