find a value in entire table...
| From: | Tristan dot Pretty at risk dot sungard dot com | Date: | Wed, 06 Apr 2005 12:51:48 +0000 |
| Subject: | find a value in entire table... | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-39131@lists.php.net to get a copy of this message | ||
I need to search an entire table for a value, and then report back what
field it was found in... how on earth do I do that?
I've a list of departments, as field names.
whenever a user interacts with that Dpet, I wanna add thier id No to the
appropriate field.
so I'll be left with a table that looks like this:
================================
| Accounts | HR | Support | Marketing |
--------------------------------------------------------
| 23 | | | |
| | 17 | | |
| | | 17 | |
| 19 | | | |
| | | | 4 |
================================
So User 17 has dealt with HR and Support, and user 23 has dealt with only
Accounts.
So I wanna input an user ID no, and then get told what Dpets have been
accessed...
I need to learn this, as I know it's simple, but I've never had to do it
before!
Tris....