savithananda
-
Posts
2 -
Joined
-
Last visited
Posts posted by savithananda
-
-
Hi ,
I have a website which uses apostrophe in merchant names (craig's) and Product name (Fresh goat's).
If I try click on the search pages using these names with apostrophe then it displays the following error.
Error: SELECT * FROM merchant WHERE user_name='Major_Craig's_Chutney' && is_active='1'
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's_Chutney' && is_active='1'' at line 1
I tried to add an apostrophe in php file of merchant search but still it shows up the same error or empty page.
can anyone help me on this????
Apostrophe in URL not working
in MySQL Help
Posted
Hi Guru,
Thank you. It works fine in mysql but I am getting problem when the page is loading.In search forms company name passed as parameter in url , that is where I am getting this error. I tried to fix it in search.php file using urlencode but it is not fixed.
code used: <?echo urlencode($merchant->company_name);?>