Hi!

[LONG EXPLAINATION OF THE PROBLEM (questions further down)]
I'm about to create a MySQL db for a company dealing with plants (trees and
bushes and that sort of thing). Now a user should be able to search for a
specific plant in this db - but that specific plant could come in many
different shapes or forms or what-ever, but it is still the same plant...
I've thought about adding the same plant many times in the db, wich isn't
logical correct or have one fields for each state that the plants come in.
but that won't be correct either.

Now, I'm thinking like this; One table for all states and one field in the
main plant table for which states in the states-table that should be used...

[...QUESTION 1]
Is there some built in operation/operators/functions for dealing with
bitwize operations in PHP/MySQL?

I would like a feild in the MySQL table 1 to store (perhaps) the value 0000
0101 (or 5) and that should tell PHP to get the information from the MySQL
table 2 where the primary key equals 1 and 4:

table 2
| pri_key | info                        |
|      1      |  aaldkjkjskiiejifr.... |
|      2      |  aaldkjkjskiiejifr.... |
|      4      |  aaldkjkjskiiejifr.... |
|      8      |  aaldkjkjskiiejifr.... |
|     16     |  aaldkjkjskiiejifr.... |
|     32     |  aaldkjkjskiiejifr.... |
.....

[...QUESTION 2]
Is this the best way to do what I'm about to do or is there some better way?




well... that's it I suppose...



.bobo

Reply via email to