RE: [PHP-DB] Functions - scope of returned result

2003-08-14 Thread Dillon, John
To answer my own question again, I didn't assign the returned value from the function call to a variable: $piv_result=queries(); All OK. -Original Message- From: Dillon, John [mailto:[EMAIL PROTECTED] Sent: 14 August 2003 17:54 To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Functions

Re: [PHP-DB] Functions - scope of returned result

2003-08-14 Thread John W. Holmes
Dillon, John wrote: One more bite on this code. function queries(){ //code.. $piv_result=mysql_db_query($db, $query, $connection) or die (Query9 failed: $query); return $piv_result; } function print(){ global $piv_result;

RE: [PHP-DB] Functions - scope of returned result

2003-08-14 Thread Dillon, John
One more bite on this code. function queries(){ //code.. $piv_result=mysql_db_query($db, $query, $connection) or die (Query9 failed: $query); return $piv_result; } function print(){ global $piv_result; $count_fields=mysql_num_fields($piv_result);