kanala Posted August 13, 2007 Share Posted August 13, 2007 Something's gone wrong after the "LIKE" please correct what symbols are required.Thanks $result2 = mysql_query("SELECT * FROM Products WHERE Similar LIKE \"%$row%['Similar']\" LIMIT 8");while($row2 = mysql_fetch_array($result2)) Link to comment Share on other sites More sharing options...
Synook Posted August 13, 2007 Share Posted August 13, 2007 $result2 = mysql_query("SELECT * FROM Products WHERE Similar LIKE \"%$row[Similar]%\" LIMIT 8"); You were trying to reference the array value incorrectly.I'm wrong again! ah well I learn something everyday too Link to comment Share on other sites More sharing options...
justsomeguy Posted August 13, 2007 Share Posted August 13, 2007 That should still have quotes in it. It is not correct to reference an associative array in a string without quotes, you are causing an extra constant lookup every time you do. Enable all error messages to see the notice for that one.$result2 = mysql_query("SELECT * FROM Products WHERE Similar LIKE \"%{$row['Similar']}%\" LIMIT 8"); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.