Mysql fuzzy query
Variables in double quotation marks are automatically parsed.
$ SQL = "SELECT * FROM oneself WHERE name like '% {$ colname_Recordset1}' LIMIT {$ startRow_Recordset1}, {$ maxRows_Recordset1 }";
$ Recordset1 = mysql_qu
Variables in double quotation marks are automatically parsed.
$ SQL = "SELECT * FROM oneself WHERE name like '% {$ colname_Recordset1}' LIMIT {$ startRow_Recordset1}, {$ maxRows_Recordset1 }";
$ Recordset1 = mysql_query ($ SQL) or die (mysql_error ());
Put {} on both sides of the variable to directly specify this variable and its name,
Query Chinese characters,
Select * from mytable where mysqlname like "% No %"
If it is a word-specific query of English characters,
Select * from mytable where mysqlname like Binary ("% A % ")
If the preceding conditions require
Select * from mytable where mysqlname like "% Not %" AND mysqlname like Binary ("% A % ")
Select id, name from depart where name like %? % This is only a fuzzy query of name
What should I do if I want to perform fuzzy search on the id?
Select id, name from depart where ID like '% 100'