Search the Community
Showing results for tags 'boolean'.
-
I'm running PHP files of example 2 from my computer and I got those following errors across pages. An error occurred in script 'D:\XAMPP\htdocs\ex2\html\views\home.html' on line 14: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given Array An error occurred in script 'D:\XAMPP\htdocs\ex2\html\shop.php' on line 32: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given Array An error occurred in script 'D:\XAMPP\htdocs\ex2\html\sales.php' on line 20: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given Array An error occurred in script 'D:\XAMPP\htdocs\ex2\html\wishlist.php' on line 80: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given Array An error occurred in script 'D:\XAMPP\htdocs\ex2\html\cart.php' on line 81: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given Array Can someone please tell me how to fix it? Thanks.
- 15 replies
-
- mysqli_num_rows()
- boolean
-
(and 4 more)
Tagged with:
-
I am trying to implement a search feature to a forum I am creating and I want users to be able to search through posts. So far users type in the search terms in a form, and they go through to my $_GET['terms']. The problem is that the IN BOOLEAN MODE search only returns posts that start with or end with one of the search terms users type into the form. I want it so that the search can also return phrases that are within posts, not necessarily starting or ending with. I have tried the boolean mode operators in all sorts of ways but it doesn't work. Is it possible to use fulltext searches in this way, or should I try a different method. Here is my Mysql query I am using: $terms = mysqli_real_escape_string($dbc, htmlentities(strip_tags($_GET['terms']))); $q = "SELECT m.message, m.posted_on, s.thread_id, s.subject FROM posts AS m LEFT JOIN threads AS s USING (thread_id) WHERE MATCH (message, subject) AGAINST('$terms*' IN BOOLEAN MODE)";
-
Hi, Old novice I am - confused and frustrated I'm getting. I see the following error: Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in C:\XAMPP\xampp\htdocs\websitename\edit_user.php on line 91 This happens in scripts 9.2 and 9.3 when they are called from script 9.1 I can't tell if this is because I think I'm talking to the database and I'm not, or if there's something about the setup I have of XAAMP - which I kind of doubt - or if there's something wrong with script 9.1. That's why I didn't initially post the code - cause I don't know what'd be helpful. I have looked over the code in 9.1 and 9.2 with a fine tooth comb. Found mistakes but nothing that fixed this error. What causes mysqli_num_rows() to return a boolean? I have been searching everywhere. Did I miss something in Larry's explanation? I'm sure it's right in front of me ... I'll be dayng-ed if I can find it! Help - and Thanks! Mike
- 10 replies
-
- boolean
- mysqli_num_rows
-
(and 2 more)
Tagged with: