Function misfunction - 2

From: Date: Tue, 31 Dec 2002 06:28:35 +0000
Subject: Function misfunction - 2
Groups: php.general 
Request: Send a blank email to php-general+get-129743@lists.php.net to get a copy of this message
NOW what am I doing wrong?? function setCurrentDevGroup($devID) { $query = "SELECT dev_group FROM tracking WHERE (computer = $devID)"; $sth = $adb->prepare($query); if($sth) { $res = $sth->execute(); $resulttable = $sth->fetchrow_hash(); $lookuptable = $resulttable["dev_group"]; } echo $lookuptable; // gives e.g. printers return $lookuptable; // will not return the value to .... } . . . setCurrentDevGroup($this->ComputerID); // calling function $query = "SELECT name FROM $lookuptable WHERE (ID = $this->ComputerID)"; //debug line echo $lookuptable; // gives an empty string.

« previous php.general (#129743) next »