Assume that the database connection is good, the table name and column name are correct, and that there is actually a row in the database with the value “advoom.com” in it. What keeps this from working? I get the error “Unknown column ‘advoom.com’ in ‘where clause'”
I’ve also tried putting the variable outside the quotes and using “.” to concatenate the command. Same error.
This is a snippet of a PHP page written in Dreamweaver.
$pageURL = “advoom.com”;
mysql_select_db($database_bizCon, $bizCon);
$query_Recordset1 = "SELECT * FROM buttonprefsNEW WHERE curl = $pageURL";
$Recordset1 = mysql_query($query_Recordset1, $bizCon) or die(mysql_error());
You need to surround a string with quotes in sql.
And don’t forget to escape your input if needed.