$sql_del="select * from report2 where file='$_GET[file_name]'";
$requery=mysql_db_query($dbname,$sql_del);
$rs=mysql_fetch_array($requery);
$file_name=$rs['file'];
unlink("filexls/$file_name"); ///path ที่เก็บภาพ ต้อง set ให้ถูกต้อง
$sql2="Delete from report2 where file='$_GET[file_name]' ";
$res=mysql_db_query($dbname,$sql2);
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/denchai/domains/denchaihosp.com/public_html/book/phpMySQLDeleteRecord.php on line 11
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/denchai/domains/denchaihosp.com/public_html/book/phpMySQLDeleteRecord.php on line 8
<?
$objConnect = mysql_connect("localhost","denchai_admin","denchai_hosp") or die("Error Connect to Database");
$objDB = mysql_select_db("test");
$sqlfile="select file where FilesName for, FilesID = '".$_GET["CusID"]."' ";
$queryfile=mysql_query($sqlfile);
$resultfile=mysql_fetch_array($queryfile);
$FilesName=$resultfile[0];
$strSQL = "DELETE FROM files WHERE FilesID = '".$_GET["CusID"]."' ";
@unlink("./myfile/$FilesName");
$objQuery = mysql_query($strSQL);
if($objQuery)
{
echo "Record Deleted.";
}
else
{
echo "Error Delete [".$strSQL."]";
}
mysql_close($objConnect);
?>
เหมือนเดิมเลยอะครับ งง จัง
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/denchai/domains/denchaihosp.com/public_html/book/phpMySQLDeleteRecord.php on line 8
Record Deleted.
Date :
2010-01-22 18:00:50
By :
winfast01
No. 13
Guest
$sqlfile="select file where FilesName for, FilesID = '".$_GET["CusID"]."' "; ไอ้นี่คืออะไรหรอ
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/denchai/domains/denchaihosp.com/public_html/book/phpMySQLDeleteRecord.php on line 8