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?
