Hi All,
Good Evening from UK. Hope all are well.
I am trying to create a search functionality which searches my MySQL database and shows me results. It works when I pass a number OR an absolute text and bubble shows the data from my database.
The problem arises when I try to use “LIKE” in my SQL query to create a true search functionality where user starts writing a string and the output is all the corresponding rows matching in my database.
My query looks something like:
SELECT Barcode,Brand_Name,Name_of_the_Product,MRP,Store_ID FROM Product_Database
where Name_of_the_Product LIKE “%?%” LIMIT 200
I am using ? as the Parameter which I am passing to the query. So for e.g if I pass something like “Math” then bubble actually converts it into:
SELECT Barcode,Brand_Name,Name_of_the_Product,MRP,Store_ID FROM Product_Database
where Name_of_the_Product LIKE “%‘Math’%” LIMIT 200
Checkout single quotation marks around the string I pass and of course my data in column does not have any quotes and so it does not bring back any data.
Has anyone been able to use the LIKE command through bubble in SQL?
Any help OR pointers will be greatly appreciated.
Thanks
Shashank
This thread should answer your question: SQL conection sintax
Joey