name; } /* $myfile = fopen($_SERVER['DOCUMENT_ROOT']."/temp_log/".uniqid('var_dump_').".txt", "w") or die("Unable to open file!"); fwrite($myfile, $intNumField."\n"); fwrite($myfile, $sql."\n"); fwrite($myfile, $col[0]."\n"); fclose($myfile); */ while ($obResult = mysqli_fetch_array($objQuery)) { $arrCol = array(); for ($i = 0; $i < $intNumField; $i++) { $data[$col[$i]] = $obResult[$i]; } array_push($resultArray, $data); } return $resultArray; } function query($string,$tabel,$where='1=1',$join=''){ global $link; db_connect(); $sql="SELECT $string FROM $tabel $join WHERE $where "; //echo $sql.'
'; $objQuery = mysqli_query($link, $sql); $resultArray =array(); $intNumField = mysqli_num_fields($objQuery); while ($objResult = mysqli_fetch_array($objQuery)) { $arrCol = array(); for ($i = 0; $i < $intNumField; $i++) { $data[mysqli_fetch_field_direct($objQuery, $i)->name] = $objResult[$i]; } array_push($resultArray, $data); } if ( strpos($table, 'amphur') !== false ) { $myfile = fopen($_SERVER['DOCUMENT_ROOT']."/temp_log/".uniqid('form_register_amphur_').".txt", "w") or die("Unable to open file!"); fwrite(strpos($string, 'amphur')."\n"); fwrite($myfile, $sql."\n"); fwrite($myfile, print_r($resultArray, true)."\n"); fclose($myfile); } return $resultArray; } function insertData($table,$data){ global $link; db_connect(); $fields=""; $values=""; $i=1; foreach($data as $key=>$val) { if($i!=1) { $fields.=", "; $values.=", "; } $fields.="$key"; $values.="'$val'"; $i++; } $sql = "INSERT INTO $table ($fields) VALUES ($values)"; // echo $sql.'

'; if(@mysqli_query($link, $sql)) { return true; } else {return false;} } function insertDataId($table,$data){ global $link; db_connect(); $fields=""; $values=""; $i=1; foreach($data as $key=>$val) { if($i!=1) { $fields.=", "; $values.=", "; } $fields.="$key"; $values.="'$val'"; $i++; } $sql = "INSERT INTO $table ($fields) VALUES ($values)"; // echo $sql.'

'; if(@mysqli_query($link, $sql)) { return mysqli_insert_id($link); } else {return 0;} } function updateData($table,$data,$where){ global $link; $modifs=""; $i=1; foreach($data as $key=>$val) { if($i!=1){ $modifs.=", "; } $modifs.=$key.' = "'.$val.'"'; $i++; } $sql = ("UPDATE $table SET $modifs WHERE $where"); //if($table == 'ali_member')\ //echo $sql.'
'; if(@mysqli_query($link, $sql)) { return true; } else { die("SQL Error:
".$sql."
".mysqli_error()); return false; } $text="uid=".$_SESSION["adminusercode"]." action=$table =>$sql"; } ?> บริษัท ยูนิไลฟ์ อินเตอร์เนชั่นแนล จำกัด https://web.unilife.co.th Tue, 30 Nov -001 00:00:00 +0000 th hourly 1 https://wordpress.org/?v=7.1 https://web.unilife.co.th/?p=12332 https://web.unilife.co.th/?p=12332#respond https://web.unilife.co.th/wp-content/uploads/2023/09/app_org.png https://web.unilife.co.th/?feed=rss2&p=12332 0 12332 https://web.unilife.co.th/?p=12330 https://web.unilife.co.th/?p=12330#respond https://web.unilife.co.th/wp-content/uploads/2023/09/aorb.png https://web.unilife.co.th/?feed=rss2&p=12330 0 12330 https://web.unilife.co.th/?p=12328 https://web.unilife.co.th/?p=12328#respond https://web.unilife.co.th/wp-content/uploads/2023/09/gorb.png https://web.unilife.co.th/?feed=rss2&p=12328 0 12328 https://web.unilife.co.th/?p=12326 https://web.unilife.co.th/?p=12326#respond https://web.unilife.co.th/wp-content/uploads/2023/09/pwalk.png https://web.unilife.co.th/?feed=rss2&p=12326 0 12326 https://web.unilife.co.th/?p=12324 https://web.unilife.co.th/?p=12324#respond https://web.unilife.co.th/wp-content/uploads/2023/09/4step.png https://web.unilife.co.th/?feed=rss2&p=12324 0 12324 https://web.unilife.co.th/?p=12336 https://web.unilife.co.th/?p=12336#respond https://web.unilife.co.th/wp-content/uploads/2023/09/Screenshot_5.jpg https://web.unilife.co.th/?feed=rss2&p=12336 0 12336