I must be "snow-blind" because I have been looking for hours and I just cannot see where this SQL syntax error is...
"You have an error in your SQL syntax near 'Resource id #2' at line 1"
the code is :
$db = @mysql_connect("localhost","user","pass") or header("Location: maint.php");
mysql_select_db("database",$db) or header("Location: maint.php");
$result = mysql_query("SELECT field1 FROM table WHERE field2 = '$field3'",$db);
if ($myrow = mysql_fetch_array($result)) {
// do stuff
}
Any help is much appreciated.