Re: [PHP-DB] Query does not work

2014-07-02 Thread Jim Giner
Once again you have provided the group with RANDOM pieces of code, completely out of context since you have already shown me that your query and db connection are being used in a function, hence your loss of $cxn. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http:/

Re: [PHP-DB] Query does not work

2014-07-02 Thread Lester Caine
On 02/07/14 04:43, Ethan Rosenberg, PhD wrote: > while ($row31 = mysqli_fetch_row($result31)) { > printf ("%s %s %s %s %s\n", $row31[0], $row31[1], $row31[2], $row31[3]); Try print_r( $row31 ); > } // no output > > How can I loose a db connection in the middle of a program? This is not sho

Re: [PHP-DB] Query does not work

2014-07-01 Thread Ethan Rosenberg, PhD
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 n

[PHP-DB] Query does not work

2014-06-30 Thread Ethan Rosenberg, PhD
Dear List - Here is a query: select Lname, Fname, Payments, Charges, Balance from Customers, Charges where (Charges.Cust_Num = Customers.Cust_Num) and (Customers.Cust_Num =1022); Works beautifully from the terminal. In the php script: $sql31= "select Lname, Fname, Payments, Charges, Balanc