mysql_fetch_assoc question

From: Date: Wed, 04 Sep 2002 09:31:50 +0000
Subject: mysql_fetch_assoc question
Groups: php.db 
Request: Send a blank email to php-db+get-21559@lists.php.net to get a copy of this message
Hey all, I managed to find that if I do: $MemberID = @mysql_query("SELECT ID FROM SiteMember WHERE Username = '$valid_user'"); $array = mysql_fetch_assoc($MemberID); print_r($array); this will produce: Array ( [ID] => 3 ) All I want is the value 3 so that I can go ahead and insert that into the Lookup table. Any ideas how I can just extract this value? I'm also not 100% clear on what "mysql_fetch_assoc" does, can anyone explain it? Cheers in advance, Graeme :)

« previous php.db (#21559) next »