<?php
$result = mysql_query("SELECT `name` FROM `added_users`");
(5)$myrow = mysql_fetch_array ($result);
do {
printf ("%s", $myrow["name"]);
}
(9)while ($myrow = mysql_fetch_array ($result));
?>
<?php
$result = mysql_query("SELECT `name` FROM `added_users`")
or die("Invalid query: " . mysql_error());
$myrow = mysql_fetch_array ($result);
do {
printf ("%s", $myrow["name"]);
}
while ($myrow = mysql_fetch_array ($result));
$result = mysql_query("SELECT `name` FROM `added_users`") or die(mysql_error());
$link = mysql_connect('localhost', 'username', 'password');
$result = mysql_query("SELECT `name` FROM `added_users`",$link);
// ...
var_dump(mysql_error());
чтобы получить код этой ошибки.