Home  >  Article  >  Backend Development  >  MySQL where condition replacement question?

MySQL where condition replacement question?

WBOY
WBOYOriginal
2016-08-18 09:15:371171browse

Field: articlecategory/index?type=article

Value: ariciclecategory/index

Requirement: Comparison? Are the previous self-reading content and value equal? ​​

I want to remove the content including hello from the comparison every time I query. How do I write where?

Currently: select * from where ziduan = 'ariclecategory/index';

Reply content:

Field: articlecategory/index?type=article

Value: ariciclecategory/index

Requirement: Comparison? Are the previous self-reading content and value equal? ​​

I want to remove the content including hello from the comparison every time I query. How do I write where?

Currently: select * from where ziduan = 'ariclecategory/index';

<code>select * from where ziduan like 'ariclecategory/index%'</code>

ariclecategory/index If it is a variable, please use variable replacement
Likes with prefix matching can be indexed. Suffix matching and fuzzy matching are not possible.

select * from where ziduan like 'ariclecategory/index%' ?I don’t understand what it means

Removal of question marks and data processing must be done in the program. Just write the where of sql as you are now

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn