function returns no value

From: Date: Sun, 20 Apr 2008 20:51:36 +0000
Subject: function returns no value
Groups: php.general 
Request: Send a blank email to php-general+get-273337@lists.php.net to get a copy of this message
Hello, with the following call I try to print a string out of DB echo $allg->translate($db, $lang, 14, "auth/authCallback", 4); function translate () should do a DB querry and returns the requested string. Although the querry yields a positive result, the function returns no value. Here is the function: function translate ($db, $lang, $MaiKey, $page, $pid) { $statement = "SELECT fa FROM language WHERE MaiKey='$MaiKey' AND page='$page' AND pid='$pid'"; $result = $db->Execute($statement); if ($result=== false) die(); return $result->fields[0]; } Could anybody see what is going wrong here? I appreciate any hint. Ali

« previous php.general (#273337) next »