Changeset 5908


Ignore:
Timestamp:
2006/09/26 17:48:45 (20 years ago)
Author:
kakinaka
Message:

blank

File:
1 edited

Legend:

Unmodified
Added
Removed
  • temp/trunk/html/admin/customer/edit.php

    r5907 r5908  
    183183function lfRegisDatat($array, $arrRegistColumn) { 
    184184    global $objConn; 
     185    global $objQuery; 
    185186     
    186187    foreach ($arrRegistColumn as $data) { 
     
    202203    } 
    203204 
    204     $arrRegist["create_date"] = date( "Y/m/d H:i:s", time()); 
    205     $arrRegist["update_date"] = date( "Y/m/d H:i:s", time()); 
     205    $arrRegist["update_date"] = "Now()"; 
     206    $arrRegistMail["update_date"] = "Now()"; 
    206207    $arrRegistMail["mail_flag"] = $array["mail_flag"]; 
    207208    $arrRegistMail['email'] = $array['email']; 
    208209    //-- ÊÔ½¸ÅÐÏ¿¼Â¹Ô 
    209210    $objConn->query("BEGIN"); 
    210     $objConn->autoExecute("dtb_customer", $arrRegist, "customer_id = '" .addslashes($array["customer_id"]). "'"); 
     211    $objQuery->Insert("dtb_customer", $arrRegist, "customer_id = '" .addslashes($array["customer_id"]). "'"); 
     212     
    211213    //-- ¥á¥ë¥Þ¥¬ÅÐÏ¿ 
    212     $objConn->autoExecute("dtb_customer_mail", $arrRegistMail, "email = '" .addslashes($array["edit_email"]). "'"); 
     214    $mailmaga = $objQuery->getAll("SELECT * FROM dtb_customer_mail WHERE email = ?", $array["edit_email"]); 
     215     
     216    if(count($mailmaga) > 0 ){ 
     217        $objQuery->Update("dtb_customer_mail", $arrRegistMail, "email = '" .addslashes($array["edit_email"]). "'"); 
     218    }else{ 
     219        $arrRegistMail["create_date"] = "Now()"; 
     220        //$arrRegist["create_date"] = date( "Y/m/d H:i:s", time()); 
     221        $objQuery->Insert("dtb_customer_mail", $arrRegistMail); 
     222    } 
    213223    $objConn->query("COMMIT"); 
    214224} 
Note: See TracChangeset for help on using the changeset viewer.