<?
require("connect.php");
$sql="select * from entstd,enttype ";
$sql=$sql."where entstd.idtype=enttype.idtype order by entstd.idstd asc";
$result = mysql_db_query($db,$sql);
while ($object = mysql_fetch_object($result)) {
echo $object->idstd." ".$object->ename." ".$object->descp."<br>";
}
echo "<hr>";
$cntr= mysql_num_rows($result);
$cntf= mysql_num_fields($result);
for ($i=0;$i<$cntr;$i++) {
echo "<br>",$i+1," : ";
mysql_data_seek($result,$i);
$data = mysql_fetch_array($result);
for ($j=0;$j<$cntf;$j++) { echo "$data[$j] - "; }
}
?>
จำนวน : 18 บรรทัด