hi i keep getting this error on my php page
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/internal/public_html/includes/xpage_admin.php on line 871
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/internal/public_html/includes/xpage_admin.php on line 877
the code below works perfectly on my test server and error checking is on.
this is the code below
$result = $this->db->ExecuteSql ("Select w.*, c.primary_name, a.keyname From {$this->object} w LEFT JOIN `smp_customers` c ON w.client_name=c.customer_id LEFT JOIN `smp_accesspoint` a ON w.accesspoint_type=a.keyid Order By {$this->orderBy} {$this->orderDir}" , true);
while ($row = $this->db->FetchInArray ($result)) line 871
{
$client_name = $row['client_name'];
$id = $row['wireless_id'];
$ssid_1 = $row['ssid_1'];
$ssid_2 = $row['ssid_2'];
$ssid_3 = $row['ssid_3'];
$ssid_4 = $row['ssid_4'];
$ssid_password_1 = $row['ssid_password_1'];
$ssid_password_2 = $row['ssid_password_2'];
$ssid_password_3 = $row['ssid_password_3'];
$ssid_password_4 = $row['ssid_password_4'];
$accesspoint_type = $row['accesspoint_type'];
$edit_link = "<a href='{$this->pageUrl}?ocd=edit&id=$id'><img src='./images/edit.gif' alt='Edit' /></a>";
$del_link = "<a href='{$this->pageUrl}?ocd=del&id=$id' onClick=\"return confirm ('Do you really want to delete this Wireless SSID?');\"><img src='./images/trash.gif' alt='Delete' /></a>";
$bgcolor = ($bgcolor == "#EEEEEE") ? "#FFFFFF" : "#EEEEEE";
$this->data ['TABLE_ROW'][] = array (
"ROW_CLIENT" => ($client_name == 0) ? " " : "<a href=clients.php?ocd=search&search_field=customer_id&search_info=".$row['client_name'].">".$row['primary_name']."</a>",
"ROW_SSID1" => ($ssid_1 == "") ? " " : $ssid_1,
"ROW_SSID2" => ($ssid_2 == "") ? " " : $ssid_2,
"ROW_SSID3" => ($ssid_3 == "") ? " " : $ssid_3,
"ROW_SSID4" => ($ssid_4 == "") ? " " : $ssid_4,
"ROW_SSID_PASSWD1" => ($ssid_password_1 == "") ? " " : $ssid_password_1,
"ROW_SSID_PASSWD2" => ($ssid_password_2 == "") ? " " : $ssid_password_2,
"ROW_SSID_PASSWD3" => ($ssid_password_3 == "") ? " " : $ssid_password_3,
"ROW_SSID_PASSWD4" => ($ssid_password_4 == "") ? " " : $ssid_password_4,
"ROW_ACCESSPOINT_TYPE" => ($accesspoint_type == "") ? " " : "<a href=accesspoint.php?ocd=search&search_field=keyid&search_info=".$row['accesspoint_type'].">".$row['keyname']."</a>",
"ROW_EDITLINK" => $edit_link,
"ROW_DELLINK" => $del_link,
"ROW_BGCOLOR" => $bgcolor
);
}
$this->db->FreeSqlResult ($result); //877
these are the functions in line 871 and 877
function FetchInArray ($result)
{
return mysql_fetch_array ($result);
}
//--------------------------------------------------------------------------
function FreeSqlResult ($result)
{
mysql_free_result ($result);
}
Any help is appreciated