Mysql
Function: mysql_fetch_row()
function: mysql_fetch_row ( result );
return
type: array
content: ใช้คืนค่า ค่าข้อมูล ของ result
ในแถวที่ชี้อยู่ และเก็บไว้ที่ array และเลื่อนไปตัวชี้ชี้ไปยังตำแหน่งถัดไป
โดย
array
ที่ได้มี key คอลัมน์ที่ โดยจะคืนค่า false ถ้าเกิดความผิดพลาดขึ้น
example: $conn = mysql_connect (
"localhost", "root", "1234" );
$sql
= "SELECT * FROM employee INNER JOIN position ON employee.position_id =
position.id";
$result
= mysql_db_query ( "dblabcode", $sql, $conn );
while
( $record = mysql_fetch_row ( $result ) )
{
echo $record[0] . " " .
$record[1];
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น