PHP MySQL LIKE Operator and search query in mysql

Description

search query in mysql php used and select record in mysql table 

How to write search query in mysql php and display record with set limit

Using MySQL php LIKE Operator with % used in search query

SELECT * FROM student WHERE name LIKE 'a%';

in case result display only a first word match in name table 

that is First a word match 

eg aman, arun

SELECT * FROM student WHERE name LIKE '%u';

 

 

in case result display only a last word match in name table 

that is last a word match 

eg raju, renu

SELECT * FROM student WHERE name LIKE '%a%';

in case result display only a middle word match in name table 

that is middle a word match 

eg raman, rajan

Select * from srudent WHERE date BETWEEN '$datestart%' AND '$dateend%' order by id desc LIMIT 0,300