the problem is mysql_num_rows is returning zero rows.. when it should return 1 row.
the variable $value is an array with two strings (testa and testb)...
when i remove the foreach loop and replace $key with 'testa' in the query it works(returns 1 row). how do i solve this?... both 'testa' and testb' have a row each in mysql.
foreach($value as $key) {
$updatestable = mysql_query("SELECT * FROM `Stacks` WHERE keywords LIKE '%$key%' ORDER BY id DESC LIMIT 1")or die (mysql_error());
$upnum = mysql_num_rows($updatestable);
echo $upnum;
}