mysql_fetch_array(): supplied argument is not a valid MySQL result
i ve a script that runs to retrieve a row in database, when i run it on the local testing server it runs fine but when it is change to connect wit the remote server and uploaded it brings out this error "mysql_fetch_array(): supplied argument is not a valid MySQL result" is this another issue with PHP running on the server or wat cos i just got thru one Pls!!!!!!!!!!!!!!! help me out
<?php require_once('Connections/etaxi.php'); ?>
<?php $id = mysql_insert_id($etaxi);
$query = "SELECT * FROM bookings WHERE booking_id = $id";
$result = mysql_query($query);
$row = mysql_fetch_array($result);
$name = $row[1];
$phone = $row[2];
$office_addr = $row[3];
$organisation = $row[4];
$pickup_addr = $row[5];
$pickup_area = $row[6];
$nearest_bs = $row[7];
$destination = $row[8];
$pickup_date = $row[9];
$pickup_time = $row[10];
$txn_date = $row[11];
mysql_fetch_array(): supplied argument is not a valid......
Moderator: General Moderators
Re: mysql_fetch_array(): supplied argument is not a valid......
Hi,
change: $result = mysql_query($query);
to: $result = mysql_query($query) OR die("Error: $query <br> ".mysql_error());
change: $result = mysql_query($query);
to: $result = mysql_query($query) OR die("Error: $query <br> ".mysql_error());