MySQLi using LIKE with URL parameter not working correctly
I am transitioning from Dreamweaver CS6 PHP/MySQL to Dreamweaver CC 2015 and MySQLi using the WebAssist Suite (it's been a VERY frustrating experience). I have a very simple recordset and it takes the URL parameter as the variable, so I send to the page something like this:
And it works fine because the category = history. But my query has LIKE, not = so when the category is, say, Literary Fiction and I use:
It delivers no results, and I need to have this functionality for a number of purposes on the site. If I use subject1=Literary Fiction it works, but that's not what I need, especially when I start searching two different fields with that one word (can't wait to see how much fun that will be).
Here is the recordset:
$rsBySubject = new WA_MySQLi_RS("rsBySubject",$connProjMain1,1);
$rsBySubject->setQuery("SELECT isbn13, coverimage, title, full_title, subtitle, subject1, subject2, active_web, pub_date, auth_id, publisher FROM books WHERE subject1 LIKE ? ORDER BY pub_date ASC");
$rsBySubject->bindParam("s", "".(isset($_GET['subject1'])?$_GET['subject1']:"") ."", "-1"); //colname
This is about as simple as you can get and I generated it using the "Simple" interface in the WebAssist MySQLi recordset creator. When I hit "Test" in the dialogue box it initially works, but when I save it and open the browser using the link above I get no results. Interesting aside... when I then reopen the dialogue box to edit the recordset (after it crashes DW CC a few times) it will no longer go back to the simple interface - it says the query is too complex. But I did nothing to it. So it will still return results for subject1 = but not for subject1 LIKE.
I would appreciate any help. I used to rip through this stuff in DW CS6 and MySQL and now everything is a struggle and I'm getting further behind on this project.