I had this in my script that inserted values into a MySQL table:
$sql = $db->execute("INSERT INTO sforce_account (id, name, type, parentid, billingstreet, billingcity, billingstate, billingpostalcode, billingcountry, shippingstreet,
shippingcity,shippingstate,shippingpostalcode,shippingcountry,phone,fax,accountnumber,website,sic,industry,
annualrevenue,numberofemployees,ownership,tickersymbol,description,rating,site,ownerid,createddate,createdbyid,
lastmodifieddate,lastmodifiedbyid,systemmodstamp,lastactivitydate, FY_CY_Wireless__c, FY_CY_Total_Design__c)
VALUES ('{$pass_this['id']}', '{$pass_this['name']}','{$pass_this['type']}','{$pass_this['parentid']}' , '{$pass_this['billingstreet']}', '{$pass_this['billingcity']}',
'{$pass_this['billingstate']}','{$pass_this['billingpostalcode']}','{$pass_this['billingcountry']}', '{$pass_this['shippingstreet']}',
'{$pass_this['shippingcity']}','{$pass_this['shippingstate']}','{$pass_this['shippingpostalcode']}','{$pass_this['shippingcountry']}',
'{$pass_this['phone']}','{$pass_this['fax']}','{$pass_this['accountnumber']}','{$pass_this['website']}','{$pass_this['sic']}',
'{$pass_this['industry']}','{$pass_this['annualrevenue']}','{$pass_this['numberofemployees']}','{$pass_this['ownership']}',
'{$pass_this['tickersymbol']}','{$pass_this['description']}','{$pass_this['rating']}','{$pass_this['site']}','{$pass_this['ownerid']}',
'{$pass_this['createddate']}','{$pass_this['createdbyid']}','{$pass_this['lastmodifieddate']}','{$pass_this['lastmodifiedbyid']}',
'{$pass_this['systemmodstamp']}','{$pass_this['lastactivitydate']}', '{$pass_this['fy_cy_wireless__c']}', '{$pass_this['fy_cy_total_design__c']}' )");
Someone suggested to me that this would also work:
$fields = implode(",", array_keys($pass_this));
$values = "'".implode("','",array_values($pass_this))."'";
$sql = $db->execute("INSERT INTO sforce_account (".$fields.") VALUES (.$values.")";
but the $sql line is not right and I cannot figure out what I am either missing or what I need to add, HELP!!!!!!!!