<?php
mysql_connect("mysql153.secureserver.net","java2s","password");
mysql_select_db("java2s");
$query = "SELECT id, firstname FROM Employee";
$result = mysql_query($query);
for ($count=0; $count <= mysql_numrows($result); $count++) {
$id = mysql_result($result, $count, "id");
$name = mysql_result($result, $count, "firstname");
echo "$firstname ($id) <br />";
}
?>
|