มันขึ้น Error Query [] อะคะ
ลองแก้แล้วเริ่มงงตัวเอง ช่วยหน่อยนะคะ
<html>
<head>
<title>show me</title>
</head>
<body>
<?php
$objConnect = mysql_connect("localhost","root","1234") or die("Error Connect to Database");
$objDB = mysql_select_db("company");
if(!$page or $page==1){
$page=0;
} else{
$page=($page *$limit)-$limit;
}
$link="";
for($i=1;$i<=$sum_page;$i++) {
$link.="[<a href='?page=$i'>".$i."</a>]";
}//การส่งค่าแบบ GET
echo $link="หน้า : ".$link;
$sql = "SELECT * FROM dj limit $page,$limit";
$re = mysql_query($sql) or die ("Error Query [".$strSQL."]");//การเรียกใช้ข้อมูลจากฐานข้อมูลมาใช้งานโดยกำหนดค่าการเรียกใช้
?>
</p>
<table align="center" width="297" border="1" bgcolor="#FFCCCC">
<tr bgcolor="#FF6699">
<td width="82"><div align="center">ชื่อ DJ</div></td>
<td width="70"><div align="center">รายละเอียด</div></td>
<td width="100"><div align="center">รูปภาพ</div></td>
<td width="70"><div align="center">ลบ</div></td>
</tr>
<?php
while($row= mysql_fetch_assoc($re))// คำสั่งให้แสดงข้อมูล
{
?>
<tr>
<td><div align="center"><?php echo $objResult["FilesID"];?></div></td>
<td><div align="center"><?php echo $objResult["dj_name"];?></div></td>
<td><center><a href="MyResize/<?php echo $objResult["FilesName"];?>">
<img src="MyResize/<?php echo $objResult["Thumbnails"];?>" border="0"></a></center></td>
<td width="60"><center><a href = 'delete.php?delete_id=$row[Id]' onclick=\"return confirm('YOU WANT TO DELETE!!!!')\"><img src="images/delete.png" width="27" height="29" /></a></center></td>
</tr>
<?php
}
?>
</table>
<?php
mysql_close($objConnect);
?>
<br>
<a href="aa.php">Upload Images</a>
</body>
</html>
ช่วยแก้โค้ดแสดงข้อมูล PHP หน่อยคะ
Moderators: mindphp, ผู้ดูแลกระดาน
Re: ช่วยแก้โค้ดแสดงข้อมูล PHP หน่อยคะ
$re = mysql_query($sql) or die (mysql_error()."\n<br/>Error Query [{$sql}]");
-
- PHP Newbie
- Posts: 5
- Joined: 08/03/2015 1:30 pm
Re: ช่วยแก้โค้ดแสดงข้อมูล PHP หน่อยคะ
$sql = "SELECT * FROM dj limit $page,$limit";
$re = mysql_query($sql) or die (mysql_error()."<br />\nError Query [{$sql}]");//การเรียกใช้ข้อมูลจากฐานข้อมูลมาใช้งานโดยกำหนดค่าการเรียกใช้
$re = mysql_query($sql) or die (mysql_error()."<br />\nError Query [{$sql}]");//การเรียกใช้ข้อมูลจากฐานข้อมูลมาใช้งานโดยกำหนดค่าการเรียกใช้
-
- PHP VIP Members
- Posts: 1527
- Joined: 18/08/2014 10:01 am
Re: ช่วยแก้โค้ดแสดงข้อมูล PHP หน่อยคะ
Code: Select all
$sql = "SELECT * FROM dj limit $page,$limit";
-
- Similar Topics
- Replies
- Views
- Last post
-
-
ช่วยแก้โจทย์ C# หน่อยค่ะ 1 ข้อ
by Nongfern » 04/08/2012 1:13 pm » in Programming - C/C++ & java & Python - 3 Replies
- 2052 Views
-
Last post by tohkai_php
07/08/2012 4:13 pm
-
-
- 3 Replies
- 3291 Views
-
Last post by sarunyoo
24/12/2012 12:18 am
-
- 1 Replies
- 294 Views
-
Last post by PHPMasterSpeed
20/02/2016 3:27 am
-
- 1 Replies
- 274 Views
-
Last post by thatsawan
29/03/2017 12:52 am
-
-
ขอวิธีการดึงข้อมูลจากฐานข้อมูลมาแสดงใน list box แบบ BB หน่อยค่ะ
by M030 » 17/10/2015 1:22 pm » in Programming - PHP - 3 Replies
- 1225 Views
-
Last post by M030
17/10/2015 7:06 pm
-
-
- 2 Replies
- 787 Views
-
Last post by moomai
10/04/2017 6:41 pm
Who is online
Users browsing this forum: Bing [Bot] and 9 guests