Hi,
I keep getting errors whenever i try to use mysql_fetch_array(). this is the error i'm receiving:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\program files\easyphp\www\safira\comp_view.php on line 26
this is an example fo the code that is causing the error:
$link = mysql_connect("$host", "$user", "$pass");
mysql_select_db("safira");$result = mysql_query("SELECT contacts.ct_fname, contacts.ct_lname, contacts.ct_email, locations.loc_name FROM contacts INNER JOIN locations ON contacts.loc_id = location.loc_id WHERE companies.cp_id=$cp_id");
while ($myrow = mysql_fetch_array($result)) {
printf("<tr><td>%s </td><td>%s</td><td><a href='emailform.php?address=%s'> %s</a></td></tr>\n", $myrow["contacts.ct_fname"], $myrow["contacts.ct_lname"], $myrow["contacts.ct_email"], $myrow["contacts.ct_email"], $myrow["locations.loc_name"]);
}
could this be caused by the apache configuration settings or is it the code causing the problems? i have windows 2000 installed with easyphp 1.6
thanks for your help