How to write TP5 multi-state query statement

problem description

501234. 13

the environmental background of the problems and what methods you have tried

TP5
:
where("state",1)->select*()
where("state",3)->select*()

what result do you expect? What is the error message actually seen?

1357

Aug.20,2021

according to the description, it should be a table, followed by a list of state , and you want to query all the conformant data in a state set at once.
if so, you can use the In query. I hope it can help you.
document address: query Syntax ThinkPHP5.0 complete Development Manual see Cloud
clipboard.png


in and not in

Menu