|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
||||
|
||||
|
Search a field for part of something?
I'm trying to build a website for a flower shop. One field has the categories which that arrangement can go into. I want to search that field to see if it contains a word. What is the easiest way to do this?
For instance, a field has this value: "Sympathy Thank You Get Well" and I want to search for "Thank You". |
|
#2
|
||||
|
||||
|
may i recommend a slight change in design
rather than storing the strings 'Sympathy', 'Thank You', and 'Get Well' into all the arrangement rows that belong to those categories, put them into a table then create another table with the linkages that will link your arrangements to their categories Arrangements 5 Snow White 6 Fall Colours 8 Party Time Categories 101 Sympathy 102 Thank You 103 Get Well ArrangementCats 5 101 5 102 5 103 6 102 8 101 8 102 then your query to find the arrangements for a specific category, you assume the front end interface selects which category via a dropdown list, so the value of the category id will be selected and used as the driving parameter for the query PHP Code:
|
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Search a field for part of something? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|