<?php
move_uploaded_file($_FILES["fileCSV"]["tmp_name"],$_FILES["fileCSV"]["name"]); // Copy/Upload CSV
$objConnect = mysqli_connect("localhost","root","","inventory") or die("Error Connect to Database"); // Conect to MySQL
$objConnect = mysql_connect("localhost","root","root") or die("Error Connect to Database"); // Conect to MySQL
mysql_set_charset('utf8'); // อย่าลืมกำหนดไว้ด้วย
กรณี mysqli
Code (PHP)
$objConnect = mysqli_connect("localhost","root","","inventory") or die("Error Connect to Database"); // Conect to MySQL
$objConnect->set_charset('utf8')'
ใช้ mysqli_query('set ....'); ขาด connection link ดู format ให้ดี