Code: Select all
$host = 'xxx';
$username='xxx';
$password ='xxx';
$database1 = 'db1';
$database2 = 'db2';
$cn1 = NewADOConnection('mysql');
$cn1->SetFetchMode(ADODB_FETCH_ASSOC);
$cn1->Connect($host, $username, $password,$database1);
$cn2 = NewADOConnection('mysql');
$cn2->SetFetchMode(ADODB_FETCH_ASSOC);
$cn2->Connect($host, $username, $password,$database2);
$sql = "UPDATE table1 set msg='XXX', filename='',prtstatus = 'F',dt_finished=NOW() WHERE id_queue='44'";
$cn1->Execute($sql);