PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Tue Jul 07, 2020 1:53 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Wed Dec 03, 2008 1:06 pm 
Offline
Forum Newbie

Joined: Wed Sep 10, 2008 4:25 am
Posts: 18
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];


Top
 Profile  
 
PostPosted: Wed Dec 03, 2008 1:24 pm 
Offline
Forum Contributor

Joined: Fri Oct 24, 2008 12:22 pm
Posts: 102
Hi,
change: $result = mysql_query($query);
to: $result = mysql_query($query) OR die("Error: $query <br> ".mysql_error());


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Majestic-12 [Bot] and 51 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group