|
|
|
การค้นหาข้อมูลและนำมาแสดงผลแบบมีเงื่อนไขซ้อนกันคะ....... |
|
|
|
|
|
|
|
$sql = "SELECT program, date FROM class WHERE e-mail ='".$rec['e-mail']."' " เอาที่เรา fetch_array ออกมาใส้ได้หรือเป่าครับ
|
ประวัติการแก้ไข 2012-07-06 22:21:46
|
|
|
|
Date :
2012-07-06 22:20:53 |
By :
ManGal49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ประมาณนี้...
Code (PHP)
<?php
echo"<BR>";
include "connect.php"; //
mysql_connect($host,$user,$pw) or die("µÔ´µèÍ Host äÁèä´é");
mysql_select_db($dbname) or die("µÔ´µèÍ°Ò¹¢éÍÁÙÅäÁèä´é");
mysql_query("SET character_set_results=tis620");
mysql_query("SET character_set_client='tis620'");
mysql_query("SET character_set_connection='tis620'");
mysql_query("collation_connection = tis620_thai_ci");
mysql_query("collation_database = tis620_thai_ci");
mysql_query("collation_server = tis620_thai_ci");
$sql = "select * from class ORDER BY id ASC " ;
$sqlquery=mysql_db_query($dbname, $sql);
$sqlQuery=mysql_query(sql);
$Query = mysql_query($sql);
$totalp = mysql_num_rows($Query);
if($totalp==0)
{echo "";
}else{
echo "<br>";
print "<table>";
print "<tr>";
print "<td>id</td>";
print "<td>program</td>";
print "<td>date</td>";
print "</tr>";
while($array = mysql_fetch_array($Query))
{
print "<tr>";
print "<td>".$array['id'] ." </td>";
print "<td>".$array['program'] ." </td>";
print "<td>".$array['date'] ." </td>";
print "</tr>";
}
print"</table>";
}
mysql_close();
?>
|
|
|
|
|
Date :
2012-07-06 23:05:53 |
By :
apisitp |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|