$db = mysql_connect("localhost", "root", "password");
mysql_select_db("mydb",$db);
$result = mysql_query("SELECT * FROM employees",$db);
if ($result === false) die("failed");
while ($fields = mysql_fetch_row($result)) {
for ($i=0, $max=sizeof($fields); $i < $max; $i++) {
print $fields[$i].' ';
}
print "\\n";
}
..... In $db = mysql_connect("localhost", "root", "password"); Will I encode as is or change "localhost" the name of the server, "root" the user, "password" the password or the given password...
2006-11-19
19:01:43
·
1 answers
·
asked by
edwinbiasbas
1
in
Computers & Internet
➔ Programming & Design