Re: Update multiple records
| From: | Stuart Felenstein | Date: | Tue, 11 Jan 2005 17:37:45 +0000 |
| Subject: | Re: Update multiple records | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-38102@lists.php.net to get a copy of this message | ||
--- Jochem Maas <jochem@iamjochem.com> wrote:
> > if (count($inds) > 0 AND is_array($inds)) {
> > $ind = "'".implode("','",
> > $inds)."'";
> > }
>
> looks like you want to do a select statement with
> $ind in the form of
> "SELECT * FROM yourtable WHERE yourfield IN ($inds)"
>
Adding the IN clause did not help in any way. What
I've been able to get so far is only the first record
returned from the database (even though 2 exists)
Using this result set it is picking up the correct
user records:
$query_rsLPINDS = sprintf("SELECT
LurkProfiles_Industries.ProfileID,
LurkProfiles_Industries.IndID,
LurkerProfiles.ProfileID FROM LurkProfiles_Industries
INNER JOIN LurkerProfiles ON
(LurkProfiles_Industries.ProfileID =
LurkerProfiles.ProfileID)
INNER JOIN SignUp ON (LurkerProfiles.LurkID =
SignUp.SignUpID)
INNER JOIN StaIndTypes ON
LurkProfiles_Industries.IndID = StaIndTypes.CareerIDs)
WHERE LurkerProfiles.ProfileID = %s and LurkID = %s
and hash = '%s'",
$colname__rsLPINDS,$colname2__rsLPINDS,$colname3__rsLPINDS);
I've created the variable for IndID like this :
$IndID = $rsLPINDS->Fields('IndID');
which when I do a print_r($IndID), prints out the
first record.
So at this point I'm trying to figure out what I need
to make $IndID an array.
Stuart