note 26484 deleted from function.mysql-query by didou

From: Date: Sat, 17 May 2003 19:12:39 +0000
Subject: note 26484 deleted from function.mysql-query by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-48211@lists.php.net to get a copy of this message
Note Submitter: tom@tom420.com The following fails: function sqlquery ($query) { return mysql_query ($query); } If I do: $results = sqlquery ("SELECT bla"); mysql_num_rows($results); it says thats $results is not a ressource handler. The following works fine though: function sqlquery ($query) { $rs = mysql_query ($query); return $rs; } Looks like that there is some operation done when storing the ressource handler into a variable, which can't be performed when you do something with the results instead of storing it. (Of course sqlquery() does nothing usefull here, I needed to do some other task in it in my script which I did not include for simplicity)

« previous php.notes (#48211) next »