Well, I hope you can help me with another variation on this. Ok, so I finally got this working and it returns a book with the word "Science" in the subject1 field. This is the link:
But then I expand the query to also search for books that have Science in the subject2 field (secondary book subject) it returns nothing:
$rsBySubject = new WA_MySQLi_RS("rsBySubject",$connProjMain1,0);
$rsBySubject->setQuery("SELECT books.isbn13, books.coverimage, books.title, books.full_title, books.subtitle, books.subject1, books.subject2, books.auth_id, books.publisher, books.`description`, authors.authfirst, authors.authlast, authors.auth_id, authors.author_full FROM books, authors WHERE books.active_web = '1' AND (books.subject1 LIKE ? OR books.subject2 LIKE ?) AND authors.auth_id = books.auth_id ORDER BY authors.authlast");
$rsBySubject->bindParam("c", "".(isset($_GET['subject1'])?$_GET['subject1']:"") ."", "-1"); //colname
Pretty simple but it doesn't return any books. It should return 4 books - the one with Science in subject1 and the three with Science in subject2.
The error message is:
Warning: mysqli_stmt::bind_param() [mysqli-stmt.bind-param]: Number of variables doesn't match number of parameters in prepared statement in /webassist/mysqli/rsobj.php on line 128
Again, any help would be appreciated. I have this working on about a dozen other sites, but I didn't realize migrating from MySQL to MySQLi would be so tricky and unfortunately I need to show the client the site tomorrow.