 |
|
โดยปกติ แล้ว มันจะเรียง ไปทางขวา ยาวเหยีดเลย ผมก็เลยใช้วิธี select ที่ละ 3 id แต่เนื่องจาก ผมมี 500 กว่า id ใช้วิธีนี้ ก็ต้องเขียน กันตายหยังเขียด เป็นแน่
ช่วยแนะนำหน่อย ครับ
ความต้องการ ที่อยากได้ คือ แบบนี้ครับ ตามลิงค์
http://www.balebar.net/mama.htm
และนี่โค๊ด ที่ผมใช้ครับ
<HTML><title>«Í§¨´ËÁÒÂ</title>
<body>
<style type="text/css">
<!--
body { margin: 0px 0px; padding: 0px 0px}
a:link { color: 000000; text-decoration: none}
a:visited { color:000000; text-decoration: none}
a:hover { color: 000000; text-decoration: none}
-->
</style>
<?php
include ("config.php");
include ("function.php");
//============
?><input type ="button" value="หน้าค้นหา" javascript: onclick=location="AjaxService.html">
<?
$sql = "SELECT emname,emname2,type,id,sex,eid FROM salary where eid between '0001' and '0003' ";
$result = mysql_query($sql);
echo"<center><table cellspacing=1 cellpadding=30 ><hr><tr><td>";
while($arr = mysql_fetch_array($result)){
echo"<pre ><a href=\"editmemmusic.php?id=$arr[3]\"$arr[0]</a>
$arr[1]
[ $arr[5] ]
<pre>$arr[2]</td><td valign=top>";
}
echo"</td></tr></table>";
$sql = "SELECT emname,emname2,type,id,sex,eid FROM salary where eid between '0004' and '0006' ";
$result = mysql_query($sql);
echo"<center><table cellspacing=1 cellpadding=30 ><hr><tr><td>";
while($arr = mysql_fetch_array($result)){
echo"<pre ><a href=\"editmemmusic.php?id=$arr[3]\"$arr[0]</a> $arr[1] [ $arr[5] ]<pre>$arr[2]</td><td valign=top>";
}
echo"</td></tr></table><br>";
$sql = "SELECT emname,emname2,type,id,sex,eid FROM salary where eid between '0007' and '0009' ";
$result = mysql_query($sql);
echo"<center><table cellspacing=1 cellpadding=30 ><hr><tr><td>";
while($arr = mysql_fetch_array($result)){
echo"<pre ><a href=\"editmemmusic.php?id=$arr[3]\"$arr[0]</a> $arr[1] [ $arr[5] ]<pre>$arr[2]</td><td valign=top>";
}
echo"</td></tr></table><br>";
$sql = "SELECT emname,emname2,type,id,sex,eid FROM salary where eid between '0010' and '0012' ";
$result = mysql_query($sql);
echo"<center><table cellspacing=1 cellpadding=30 ><hr><tr><td>";
while($arr = mysql_fetch_array($result)){
echo"<pre ><a href=\"editmemmusic.php?id=$arr[3]\"$arr[0]</a> $arr[1] [ $arr[5] ]<pre>$arr[2]</td><td valign=top>";
}
echo"</td></tr></table><br>";
$sql = "SELECT emname,emname2,type,id,sex,eid FROM salary where eid between '0013' and '0015' ";
$result = mysql_query($sql);
echo"<center><table cellspacing=1 cellpadding=30 ><hr><tr><td>";
while($arr = mysql_fetch_array($result)){
echo"<pre ><a href=\"editmemmusic.php?id=$arr[3]\"$arr[0]</a> $arr[1] [ $arr[5] ]<pre>$arr[2]</td><td valign=top>";
}
echo"</td></tr></table><br>";
$sql = "SELECT emname,emname2,type,id,sex,eid FROM salary where eid between '0016' and '0018' ";
$result = mysql_query($sql);
echo"<center><table cellspacing=1 cellpadding=30 ><hr><tr><td>";
while($arr = mysql_fetch_array($result)){
echo"<pre ><a href=\"editmemmusic.php?id=$arr[3]\" $arr[0]</a> $arr[1] [ $arr[5] ]<pre>$arr[2]</td><td valign=top>";
}
echo"</td></tr></table><hr>";
?>
Tag : - - - -
|
|
 |
 |
 |
 |
Date :
31 ต.ค. 2551 19:51:01 |
By :
dang |
View :
1288 |
Reply :
4 |
|
 |
 |
 |
 |
|
|
|
 |