English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

$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

1 answers

In short Yes.

localhost, root and password must be substituted for the actual values on your system.

2006-11-19 19:08:59 · answer #1 · answered by adr41n 3 · 0 0

fedest.com, questions and answers