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, Balance from Customers,
Charges where (Charges.Cust_Num = Customers.Cust_Num) "
. "and (Customers.Cust_Num =1022)";
if (!mysqli_query($cxn, $sql31))
printf("Errormessage: %s\n", mysqli_error($cxn));
I know something is wrong, since the output is "Errormessage:, however,
the error is not stated.
Dr. Google also has no ideas. He only says
"if (!mysqli_query($cxn, $sql31))
printf("Errormessage: %s\n", mysqli_error($cxn));"
I also know that the data base connection is OK, since
$cxn = mysqli_connect($host,$user,$password);
if (!$cxn)
{
die('Connect Error (' . mysqli_connect_errno() . ') '
. mysqli_connect_error());
}
if (mysqli_select_db($cxn, "Store") == 0)
{
printf("Errormessage: %s\n", mysqli_error($cxn));
die();
}
and I ran a previous query which outputted the correct data.
TIA
Ethan
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php