$sql="SELECT * FROM excelrice_order order by Id_no desc";
$query=mysql_query($sql);
$num=mysql_num_rows($query);
if($num<=0){
$Id_order ="5300001"; //กำหนดค่าเริ่มค้น
}else{
$Id_order=mysql_result($query,0,"Id_order");
$Id_order++;
}
errorที่แสดง
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\Pri\www\system\excel_ordersave.php on line 41