|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
and or
howdy,
i come across something thats buggin me, I have a search engine type thing that has two different fields and if they fill in both, i want it to find stuff matching that matches them, but it doesnt have to matche them both. ie. I want a query that would work to the effect of : SELECT * FROM plants WHERE bot_name LIKE '%$bot%' AND OR comm_name LIKE '%$com%' however, obviously this doesnt work..anyone know of how to do this? I can achieve it with some if statements, just wanna know if you can do it in the query... |
|
#2
|
|||
|
|||
|
RE: and or
SELECT * FROM plants WHERE bot_name LIKE '%$bot%' OR comm_name LIKE '%$com%'
this will match if both match or either one matches... |
|
#3
|
|||
|
|||
|
RE: and or
hehe, well would ya look at that, it does too... :uhoh:
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > and or |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|