$exOrder = df_get_record('orders',array('ID'=7));
--
You received this message because you are subscribed to the Google Groups "Xataface" group.
Visit this group at https://groups.google.com/group/xataface.
To view this discussion on the web visit https://groups.google.com/d/msgid/xataface/33128fbf-a44d-4dc0-ad0e-a9793fcb7e8c%40googlegroups.com.
function __import__Update_Customer_orders(&$data, $defaultValues=array()){
$records = array();
$rows = explode("\n",$data);
foreach($rows as $row){
if(empty($row)){
return $records;
}else{
list($cust,$product) = str_getcsv($row);
if(is_null($cust)){
continue;
}
$exCustRec = df_get_record('Customer',array('QB_ID'=>$cust));
$ID = $exCustRec->val('ID');
if(empty($ID)){
continue;
}else{
$exOrdRec = df_get_record('Details',array('ID'=>$ID));
if(empty($exOrdRec)){
print "new Record";exit;
$newOrdRec = new Dataface_record('Details',array());
$newOrdRec->setValues(array(
'Customer_ID'=>$ID,
'orderDateTime'=>"0000-00-00 00:00:00",
'wantsStatic'=>"0",
'addEth'=>"0",
'bDay'=>"LST",
'fee'=>"FREE",
'product'=>$product,
'ordStatus'=>"BILL",
'ordLocation'=>"BSM"
));
$records[] = $newOrdRec;
}else{
print "existing Record";exit;
$exOrdRec->setValues(array(
'product'=>$product
));
$exOrdRec->save();
$records[] = $exOrdRec;
}
}
}
}
return $records;
}
EXAMPLE DATA: 7,FST
$exOrdRec = mysqli_query($link,"SELECT D.Customer_ID FROM Details D WHERE D.Customer_ID = $ID");$exists = (bool) mysqli_num_rows($exOrdRec);
To view this discussion on the web visit https://groups.google.com/d/msgid/xataface/63aff26e-11cd-4762-85f6-07c34b460fc5%40googlegroups.com.
$exOrdRec = df_get_record('Details',array('ID'=>$ID));
To view this discussion on the web visit https://groups.google.com/d/msgid/xataface/3b18e0ab-aa41-4120-bd55-ddcf768cd7b3%40googlegroups.com.