|
 |
|
jquery กับการเรียกข้อมูลจากฐานข้อมูล (อีกครั้งครับ)รบกวนด้วยครับ |
|
 |
|
|
 |
 |
|
แล้วที่ทำมาไม่ดีตรงไหนเหรอ
|
 |
 |
 |
 |
Date :
2011-01-05 13:09:40 |
By :
... |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
คือผมลองทำการ while จากฐานข้อมูลมา เวลาคลิ๊กที่รูปมันจะไม่เปลี่ยนตามรูปที่กดครับ ก็คือ มันไม่ตรงกับรูปที่กดครับ
|
ประวัติการแก้ไข 2011-01-05 13:50:31
 |
 |
 |
 |
Date :
2011-01-05 13:33:24 |
By :
Dragons_first |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (PHP)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title>Untitled Document</title>
<link type="text/css" rel="stylesheet" href="js/style.css" />
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="js/jquery.galleryview-1.1.js"></script>
<script type="text/javascript" src="js/jquery.timers-1.1.2.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#photos').galleryView({
panel_width: 1000,
panel_height: 400,
frame_width: 100,
frame_height: 100
});
});
</script>
</head>
<body><center>
<? include('config/config.inc.php');
$sql = "select * from priview order by id";
$result = mysql_query($sql,$dbcon) or die (mysql_error());
$array = mysql_fetch_assoc($result);
$row = mysql_num_rows($result);
?>
<div id="photos" class="galleryview" align="left">
<? while($array = mysql_fetch_assoc($result)){?>
<div class="panel">
<img src="img/<?=$array['image']?>" />
<div class="panel-overlay">
<h2>Effet du soleil sur le paysage</h2>
<p>Photo by <a href="http://www.sxc.hu/profile/tomharry" target="_blank">tomharry</a>. View full-size photo <a href="http://www.sxc.hu/photo/158829" target="_blank">here</a>.</p>
</div>
</div>
<? } mysql_close($dbcon);?>
<ul class="filmstrip">
<? include('config/config.inc.php');
$sql = "select * from priview order by id";
$result = mysql_query($sql,$dbcon) or die (mysql_error());
while($array = mysql_fetch_assoc($result)){?>
<li><img src="img/<?=$array['image']?>" width="100" height="100" alt="Effet du soleil" title="Effet du soleil" /></li>
<? } mysql_close($dbcon);?>
</ul>
</div></center>
</body>
</html>
จากข้างบนเป็นโค๊ดคร่าวๆยังไม่ได้บิวท์ คือมันจะหายไปรูปนึงทั้งๆที่ while จากที่เดียวกัน ซึ่งจริงๆมี 8 ภาพ แต่รูปเล็กดันโผล่แค่7
|
ประวัติการแก้ไข 2011-01-05 13:58:08
 |
 |
 |
 |
Date :
2011-01-05 13:56:47 |
By :
Dragons_first |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ดันๆๆครับ ยังแก้ไม่ได้เลย
|
 |
 |
 |
 |
Date :
2011-01-05 16:28:01 |
By :
Dragons_first |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 05
|