Hello all,
How many ways are there to put variables into a query?
The reason I ask is that I cannot get
"SELECT * FROM locations WHERE title LIKE '%".$input."%'";
The "SELECT * FROM locations" query only does give me the full table but using that input variable substitution (from an input field) kills my query and returns nothing. (yes the tables are full and contain matches haha)
How can I get this to work with POST data, and what other methods can us noobs use to add variables to our queries?
I've seen:
:variable , {'$variable'} , "%'.$input.'%" , ('$searchquery') etc
I'm sure there is more but I'm sure this will be educational to see WHY we would use the differences. Thanks!