|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Selecting from multiple possible returns from a form.
I'm pretty new at this. I'm trying to set up a php form to search a database. I can do most of what's needed, but I'm having a lot of trouble understanding how to build a SELECT that will check the variable for each field in the form and search the database on the basis of the first field containing data that it comes upon.
I've tried a string of ORs with every permutation of grammer and syntax I can think of, but everything I've tried results in a warning: Warning: Supplied argument is not a valid MySQL result resource in ... Thanks in advance. |
|
#2
|
|||
|
|||
|
have you tried a LIKE?
SELECT * FROM products WHERE prodName LIKE '%oover%' OR prodName LIKE '%lex' would match for hoover, hoovers, dishlex, paklex, etc... LIKE is a wildcard search and the % is a wildcard operator if you have %BLAH then anything that has blah at the end will match If you search for $BLAH% then anything containing blah will return, etc... |
![]() |
| Viewing: Dev Articles Community Forums > Databases > General SQL Development > Selecting from multiple possible returns from a form. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|