HOME > PHP > PHP Forum > You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and MONTH(Date)='2' and YEAR(Date)='2013' order by OrderNo desc' at line 1
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and MONTH(Date)='2' and YEAR(Date)='2013' order by OrderNo desc' at line 1
มันขึ้น
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and MONTH(Date)='2' and YEAR(Date)='2013' order by OrderNo desc' at line 1
<?
ob_start();
session_start();
if ($sess_adminid<>session_id()) {
header( "Location: loginadmin.php"); exit();
}
//============ Start Session และทำการเรียก Function ติดต่อฐานข้อมูล
include "connect.php";
มันฟ้องตรงนี้ คราฟ ผมมือใหม่ ขอโทดน่ะคราฟ
มันขึ้น
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and MONTH(Date)='2' and YEAR(Date)='2013' order by OrderNo desc' at line 1
<?
$i=0;
//=========== เลือกข้อมูลสมาชิก
include "connect2.php";
$sql = "select * From tb_order Where and MONTH(Date)='".$_GET["mm"]."' and YEAR(Date)='".$_GET["yy"]."' order by OrderNo desc ";
$query = mysql_query($sql) or die(mysql_error());
While($result= mysql_fetch_array($query)){
$i++;
?>