What are the questions about mysql statements? Provide specific ideas? There is a field in the database, such as strvalue (varchar), whose saved values are like: 1, 2, 5, 7, 2, 8, 9. 1. the value obtained from the web page is 1 or 9, & nbsp; do you have any questions about mysql statements when writing a select statement? Provide specific ideas?
There is a field in the database, such as strvalue (varchar). Its saved values are similar to:, or.
1. the value obtained from the webpage is 1 or 9,
Write a select statement to query the rows that meet the requirements of 1 or 5 in the database...
It seems that I can't use like. Can I use one sentence?
2. if the value obtained from the webpage (obtained by the check box) is 1, 2, or 8, 9,
Write a select statement to query the rows that meet 1, 2, or 8, 9 in the database...
------ Solution --------------------
Where strvalue link '% 100' or strvalue link' % 100'
------ Solution --------------------
Full-text index
------ Solution --------------------
SQL code
Where strvalue like '1, 2% 'or strvalue like' % 8, 9'