Code:
$sql = "INSERT INTO " . TABLE_ACME_PRODS . " (`acme_products_id`,`acme_products_partno`, `acme_products_orderno`, `acme_manus_id`, `acme_model_id`, `acme_products_years`, `acme_products_type`, `acme_products_catid`, `acme_products_catname`, `acme_products_matid`, `acme_products_matname`, `acme_products_dateAdded`)
VALUES (:products_id, :products_partno, :products_orderno, :products_manuid, :products_modelid, :products_years, :products_typeid, :products_catid, :products_typename, :products_matid, :products_matname, :products_dateAdded)";
$sql = $db->bindVars($sql, ':products_id', $buildacmeProductID, 'string');
$sql = $db->bindVars($sql, ':products_partno',$resultProduct->attributes()->partNo, 'string');
$sql = $db->bindVars($sql, ':products_orderno',$resultProduct->attributes()->orderNo, 'string');
$sql = $db->bindVars($sql, ':products_manuid',$resultProduct->Manufacturer->attributes()->id, 'string');
$sql = $db->bindVars($sql, ':products_modelid',$resultProduct->Model->attributes()->id, 'string');
$sql = $db->bindVars($sql, ':products_years',$resultProduct->Years, 'string');
$sql = $db->bindVars($sql, ':products_typeid',$resultProduct->ProductType->attributes()->id, 'string');
$sql = $db->bindVars($sql, ':products_catid',$resultProduct->ProductType->attributes()->categoryID, 'string');
$sql = $db->bindVars($sql, ':products_typename',$resultProduct->ProductType, 'string');
$sql = $db->bindVars($sql, ':products_matid',$resultProduct->Material->attributes()->id, 'string');
$sql = $db->bindVars($sql, ':products_matname',$$resultProduct->Material, 'string');
$sql = $db->bindVars($sql, ':products_dateAdded',now(), 'date');
echo "<BR />DEBUG 10 SQL statement = ".$sql;
$db->Execute($sql);
Do you see anything out of place or is there anything else I need to require or globalize in my fxn?
Bookmarks