I need help trying to get my mysqli_query() function to work right. I have this so far:
$raw_results = mysqli_query($con, "SELECT * FROM numdata WHERE numb='%".$k."%'
UNION
SELECT * FROM numdata2 WHERE numb='%".$k."%'
UNION
SELECT * FROM numdata3 WHERE numb='%".$k."%'
UNION
SELECT * FROM numdata4 WHERE numb='%".$k."%'
UNION
SELECT * FROM numdata5 WHERE numb='%".$k."%'
UNION
SELECT * FROM numdata6 WHERE numb='%".$k."%'
UNION
SELECT * FROM numdata7 WHERE numb='%".$k."%'
UNION
SELECT * FROM numdata8 WHERE numb='%".$k."%'
UNION
SELECT * FROM numdata9 WHERE numb='%".$k."%'
UNION
SELECT * FROM numdata10 WHERE numb='%".$k."%'");
if(mysqli_num_rows($raw_results) > 0)
I found on the internet that this works but i tried it and i recieved a boolean error like so:
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in C:\AppServ\www\newsearch\search.php on line 63
it says the error is in the last line of that code above, which means to me that the query has something wrong because its always passing a false which it shouldnt, im not sure if UNION was the correct thing to use in this case but i cant find much else that works for me. Any help is greatly appreciated.