I recently started to learn php/mysql and as my first project I'm working on an item database. I'm running into an issue though which hopefully someone can assist with.
Snipplet:
$db = mysql_connect("localhost", "my_database", "password");
mysql_select_db("my_database",$db);
$testcall = mysql_query("SELECT * FROM test_table WHERE 'a_item'",$db);
while ($myrow = mysql_fetch_array($testcall)) {
echo "<table><tr><td>ID: $myrow[ID]<br>Name: $myrow[name]</td></tr></table>\n";
}
What I'm trying to do here is search multiple rows in the table for 'a_item' within one of it's fields and have it put out the data contained in the ID and name fields for the rows that contain 'a_item'. However when I use this script the bottom array never shows. I'm probaly doing something wrong so any help is appreciated.