Re: Query does not work
| From: | Ethan Rosenberg, PhD | Date: | Wed, 02 Jul 2014 03:43:32 +0000 |
| Subject: | Re: Query does not work | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-48895@lists.php.net to get a copy of this message | ||
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 outputHow can I loose a db connection in the middle of a program? TIA Ethan