Jump to content

Search in MySQL from PHP


microbert

Recommended Posts

Hi,

I am trying to build a search page that searches MySQL database. I managed to do the search, but I have a small problem when giving the query.

Ex:
 

If for example I am searching for "how to make a search" and I type "make a search" - it works fine but if It type "how to search" it doesn't work.


can someone help me out since I am loosing my mind on this.

my sql command is:

$SQL = mysql_query("SELECT * FROM stocks WHERE `name` LIKE '%$keywords%' order by code");

help is very appreciated

 

Link to comment
https://forums.phpfreaks.com/topic/278472-search-in-mysql-from-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.