I'm trying to use a variable inside the command to query the sql DB, but for some reason it keeps erroring out like the variable wasn't put in.
mysql_select_db($sqldb);
$ccca = "Test Category";
$query = "select * from prods where catname = ".$ccca."";
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
I'm pretty sure it's just a simple syntax error? Anyone know a quick fix, thanks 🙂