This tutorial is helpful for beginners, we talked about database tutorials and used the MySQL tutorial _query,mysql_num_rows,mysql_fetch_row three functions to read and output records.
<title>selecting data</title>
<body>
<?php Tutorial
$user = "root";
$pass = "";
$db = "MyDatabase";
$link = mysql_connect ("localhost", $user, $pass);
if (! $link) {
Die ("couldn ' t connect to MySQL:". Mysql_error ());
}
mysql_select_db ($db, $link) or Die ("couldn ' t open $db:". Mysql_error ());
$result = mysql_query ("select * from domains where sex= ' F '");
$num _rows = mysql_num_rows ($result);
Print "<p> $num _rows www.111cn.net women have added data to the Table</p>n";
Print "<table>";
while ($a _row = Mysql_fetch_row ($result)) {
print "<tr>";
foreach ($a _row as $field {
print <td>. Strips Tutorial Lashes ($field). " </td> ";
}
print "</tr>";
}
Print "</table>";
Mysql_close ($link);
</body>