Hello,
I am checking to see if a word exists in a table before adding it and I am getting the above error in the following code:
// Loop round array and insert word in table
foreach ($videoWords as $resultWord)
{
$doesWordExistAlready = "select wordid from wordtoidmap where word= '$resultWord'";
$result = mysqli_query($connection, $doesWordExistAlready) or die($doesWordExistAlready);
if (!$result)
{ die("ERROR!<br />Query is: $doesWordExistAlready<br />Error is: ".mysql_error());
}
$number = mysql_num_rows($result); // Error here <<<<<<
{
$add_words = "insert into wordtoidmap values ('','$resultWord','')";
$result = mysqli_query($connection, $add_words) or die($add_vid);
}
}
Thanks,
Tim.