View Single Post
Old 10-02-2021, 08:52 AM  
Publisher Bucks
Confirmed User
 
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,125
Why is this Kicking out an Error?

Quote:
Warning: mysqli_query() expects parameter 1 to be mysqli, null given in /blah/blah/domain.com/test/index.php on line 45

Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in /blah/blah/domain.com/test/index.php on line 48
I'm pretty sure I have the mysqli query setup correctly (was originally using REXEGP but swapped it out for LIKE as REGEXP wasn't working either):

Quote:
$result = mysqli_query($con,"SELECT * FROM Recipe WHERE Ingredients REGEXP 'cat|dog';");
Quote:
// query of fetching posts
$query = mysqli_query($con,"SELECT * FROM Recipe WHERE Title LIKE '%dog%' OR WHERE Title LIKE '%cat%' ORDER BY id LIMIT $page_limit OFFSET $page_offset");

// check database is not empty
if(mysqli_num_rows($query) > 0){
Any ideas?
Publisher Bucks is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote