แบบนี้แก้ตรงไหนครับ
mysqli_query("Delete FROM test WHERE id =".$_GET['id']."" ); <<<<<< Error บรรทัดนี้ครับ
Warning: mysqli_query() expects at least 2 parameters, 1 given in E:\AppServ\www\test\list.php on line 15
Code (PHP)
<?php
require_once 'connect.php';
//ini_set('display_eror',1);
if (isset($_GET['id'])) {
$sql = "SELECT name_image FROM test WHERE id =".$_GET['id']." ";
$query = mysqli_query($conn,$sql) or die ('Error Query');
$data = mysqli_fetch_assoc($query);
$path = __DIR__.DIRECTORY_SEPARATOR.'logo_img'.DIRECTORY_SEPARATOR.$data['name_image'];
if (file_exists($path) && !empty($data['name_image'])) {
@unlink($path);
}
mysqli_query("Delete FROM test WHERE id =".$_GET['id']."" ); <<<<<< Error บรรทัดนี้ครับ
}
$sql = "SELECT * FROM test
Where member_id='admin'";
$query = mysqli_query($conn,$sql) or die ("Error Query");
?>