<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <? include("connect.php"); $sql="select * from book1"; $query=mysql_query($sql) or die("error=$sql"); $num=mysql_num_rows($query); for ($i=1;$i<=$num;$i++) { $row=mysql_fetch_array($query); $code=$row['code']; $sqlc="select OUTDATE from book1 where Left(11,13)='$code'";//บรรทัดนี้ ตรง Left(11,13) ต้องแก้เป็นอะไรเหรอครับผม ผมแก้ไม่ได้อ่าครับ $queryc=mysql_query($sqlc) or die("error=$sqlc"); $numc=mysql_num_rows($queryc); $sqlI="update time_type set quantity=$numc where code='$code'"; mysql_query($sqlI) or die("error=$sqlI"); } mysql_close(); echo "<script>alert('บันทึกเรียบร้อยแล้ว');window.location='Index.php';</script>"; ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง