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

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c30187-33cd5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c30187-33cd5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?