<?php
set_time_limit(300);
move_uploaded_file($_FILES["fileCSV"]["tmp_name"],$_FILES["fileCSV"]["name"]);
include("connectdb.php");
$objCSV = fopen($_FILES["fileCSV"]["name"], "r");
//$objCSV=str_replace("$objArr[25]","'");
while (($objArr = fgetcsv($objCSV, 10000, ",")) !== FALSE) {
$mysql1 = "select * FROM employee WHERE emp_id";
$error24 = mysql_query($mysql1)or die(mysql_error());
while($arr = mysql_fetch_array($mysql1)){
$mysql2 = mysql_query("SELECT * FROM `set` WHERE emp_id = '$arr[emp_id]'");
$error22 = mysql_query($mysql2)or die(mysql_error());
$tel2 = mysql_fetch_array($mysql2);
$error23 = mysql_query($tel2)or die(mysql_error());
$update = mysql_query("UPDATE employee SET tel = '$objArr[17]' WHERE emp_id = '$arr[emp_id]'");
$error21 = mysql_query($update)or die(mysql_error());
}
}
fclose($objCSV);
แล้วมันติด Error ดังนี้อะครับ
Warning: mysql_fetch_array() expects parameter 1 to be resource, string given in C:\Users\aoody\Desktop\xampp\htdocs\Project AOT Final\importtel.php on line 26
ช่วยแก้ไขที่นะครับ