query($sql); if( false == $result ) { echo "success"; exit(); } $rowset=$result->fetchAll(); $result->closeCursor(); if( false == $rowset ) { echo "success"; exit(); } $userid = 2; foreach( $rowset as $row_info ) { $send_success="-100"; $response = sendTelMessage($row_info['send_mobile'], "", $row_info['send_message'], $row_info['order_id']); if($response!=null){ $send_success=(int)$response; } $sql1 = "insert into order_send_message(ORDER_ID,SEND_MOBILE,SEND_MESSAGE,SEND_TIME,SEND_ERROR,CREATE_USER_ID,CREATE_TIME,UPDATE_USER_ID,UPDATE_TIME) VALUES ({$row_info['order_id']},'{$row_info['send_mobile']}', '{$row_info['send_message']}','{$current_time}', 0, {$userid},'{$current_time}', {$userid},'{$current_time}' )"; echo $sql1."
"; $pdo_cancel = conn(); $pdo_cancel->exec( $sql1 ); $update_sql = " UPDATE send_bus_success_message SET send_flag = 1, send_success_time='{$current_time}' WHERE id = {$row_info['id']} "; $pdo_cancel2 = conn(); $pdo_cancel->exec( $update_sql ); } exit();