Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
$EMAIL1 = $q->param('Email1'); $EMAIL2 = $q->param('Email2'); $EMAIL3 = $q->param('Email3'); $sth = $dbh->prepare("select user from table1 where user = '$E +MAIL1' or user = '$EMAIL2' or user = '$EMAIL3'"); $rc = $sth->execute(); while (my $row = $sth->fetchrow_hashref) { $GID = $$row{gid}; $USER = $$row{user}; }
With the code above, I'm trying to check the table to see if any of the EMAIL names are available. I want to use the first EMAIL name that's available. How do I expand the code above to do that?
Edited by Corion : Added <CODE> tags.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: code help
by PsychoSpunk (Hermit) on Feb 06, 2001 at 05:35 UTC | |
|
Re: code help
by runrig (Abbot) on Feb 06, 2001 at 05:38 UTC | |
|
Re: code help
by dws (Chancellor) on Feb 06, 2001 at 06:29 UTC | |
|
Re: code help
by kschwab (Vicar) on Feb 06, 2001 at 18:31 UTC | |
|
Re: code help
by Anonymous Monk on Feb 06, 2001 at 09:59 UTC | |
|
Re: code help
by Anonymous Monk on Feb 06, 2001 at 09:57 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |