Re: Query does not work

"Ethan Rosenberg, PhD" <[email protected]> Tue, 01 Jul 2014 23:43:32 -0400
Newsgroups gmane.comp.php.database
Organization Hygeia Biomedical Research, Inc.
Message-ID <[email protected]>
Dear List -

I think I've lost the database connection.

I put in the following code:

$sql31=	"select Lname, Fname,  Phone, Cust_Num from Customers order by 
Lname";

echo $sql31; //echos correctly
			
$result31 = mysqli_query($cxn,$sql31);

var_dump($result31); // result null


while ($row31 = mysqli_fetch_row($result31)) {
   printf ("%s %s %s %s %s\n", $row31[0], $row31[1], $row31[2], $row31[3]);
     } // no output

How can I loose a db connection in the middle of a program?





TIA

Ethan



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php