$qs_edoc ="SELECT edoc_id, project_id, edoc_name, edoc_intro, edoc_cover, edoc_url, edoc_file_name,DATE(edoc_date_time) AS edoc_date, menu_download_id,edoc_language FROM edoc WHERE edoc_status = 1 AND menu_download_id = $id
AND `edoc_language` LIKE '$lang' AND YEAR(edoc_date_time) = $rs_d[edoc_year]
ORDER BY edoc_date_time DESC ";
$qrs_edoc =mysql_query($qs_edoc);
$total=mysql_num_rows($qrs_edoc);
$e_page=10;
if(!isset($pages)){
$pages=0;
}else{
$pages=$pages-1;
if($pages<0){
$pages=0;
}
$chk_page=$pages;
$pages=$pages*$e_page;
}
$qs_edoc .=" LIMIT ".$pages.",$e_page";
$qrs_edoc = @mysql_query($qs_edoc);
if(@mysql_num_rows($qs_edoc)>=1){
$plus_p=($chk_page*$e_page)+@mysql_num_rows($qs_edoc);
}else{
$plus_p=($chk_page*$e_page);
}
$total_p=ceil($total/$e_page);
$before_p=($chk_page*$e_page)+1;
while($rs_edoc =mysql_fetch_array($qrs_edoc)){
// echo "$qs_edoc";
?>
1 ม.ค. 2513
if ($lang ==en){?>
:You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1