I'm trying to use select all rows in the mysql db where field "cat" is equal to "Test Category" , it should return 3 rows but instead errors out.
The field "cat" is set to type "text" could that be a problem?
mysql_select_db($sqldb);
$query = "select * from prods where cat = Test Category";
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
Ther error i'm recieving:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/user/public_html/folder/test.php
EDIT:
Looks like i just had another stupid syntax error 🙁
This fixed me right up:
$query = "select * from prods WHERE cat='$ccca'";