Home > Archive > PHP DB > March 2005 > Re: [PHP-DB] Working with multiple tables...
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: [PHP-DB] Working with multiple tables...
|
|
| Forest Liu 2005-03-22, 3:56 am |
| seems that you should redesign your DB table field structure...to let
your query easier.
On Mon, 21 Mar 2005 13:44:54 -0600, NIPP, SCOTT V (SBCSI)
<sn4265@sbc.com> wrote:
> I am working on revising a web request app that I have already
> developed. The app basically provides a list of system names with
> checkboxes for a user to select to request accounts on the systems. One
> feature I am intending to add is that the app should check a separate
> database of user accounts to see if the user already has an account on
> the system. I think I could get it to work by making a query of the
> userid for each system, but this seems quite inefficient. I would
> rather somehow have a single query that gets a list of system names and
> also checks the user account database at the same time to determine if
> the user already has an account. Then I would like to display ALL of
> the systems, but "grey out" the ones that the user already has accounts
> on. Can someone help me figure out the best way to go about this?
> Thanks in advance.
>=20
> Scott Nipp
> Phone: (214) 858-1289
> E-mail: sn4265@sbc.com
> Web: http:\\ldsa.sbcld.sbc.com
>=20
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>=20
>=20
--=20
Sincerely,
Forest Liu(=E5=88=98=E4=BA=91=E8=B5=9F)
| |
| Bastien Koert 2005-03-22, 3:56 am |
| A left outer join would join those tables together and if you get a result
from the users_accounts table, then you could 'grey' out the boxes.
Would need to see your table structure to be able to come up with a query...
Bastien
>From: Forest Liu <oxware@gmail.com>
>Reply-To: Forest Liu <oxware@gmail.com>
>To: php-db@lists.php.net
>Subject: Re: [PHP-DB] Working with multiple tables...
>Date: Tue, 22 Mar 2005 09:15:01 +0800
>
>seems that you should redesign your DB table field structure...to let
>your query easier.
>
>
>On Mon, 21 Mar 2005 13:44:54 -0600, NIPP, SCOTT V (SBCSI)
><sn4265@sbc.com> wrote:
>
>
>--
> Sincerely,
> Forest Liu(刘云赟)
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
|
|
|
|
|