I have a php file that generates a csv of database records for downloading. Currently all of the fields are in one table. I now must also look up a field from another table in the same database and include that information.
Here is part of the code (the entire file is attached).
$values_array = array("bookingdate", "cabinid", "hisfname", "hislname", "his_citizenship", "his_birthdate", "herfname", "herlname", "her_citizenship", "her_birthdate", "email", "billing_address1", "billing_address2", "city", "state", "zip", "countrycode", "phonenumber", "handle", "cabin_type", "packagename", "packageamount", "deduction", "payamount", "b_address1", "b_address2", "b_city", "b_state", "b_zip", "b_countrycode", "cardtype", "nameoncard", "cardnumber", "vcode", "expiry", "comments", "referrername", "affiliateid");
In addition, I need to look in table "affiliates" for "affiliateid" and if field "superior" is not 0 or null, then look up the aff_name and include it as the last item in this array. I am looking for someone to do this very quickly. You will have access to the database and I am available on msn messenger.