Stuart Felenstein wrote:
--- Jochem Maas <jochem@xxxxxxxxxxxxx> 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
If I remember correctly, you're using some kind of database class that we spent some time pinning down how to pull the values out of. If that is indeed the case - you need to request the next record to be able to pull that records value for the field in. I don't remember what package you were using - but whatever that is, I think you need to be running across your result set (foreach || while ) and requesting each result as you go (or you need to access the property of the object that stores the whole result set/etc.).
Whatever the case - I'm like 95% sure that ->Fields('fieldname') was for "last pulled rows value of this field" or similar and was for pulling record by record.
Cheers,
- Martin Norland, Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital.
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php