Ben aşağıdaki kodu çalışıyorum:
<?php
$link = mysql_connect('localhost', 'root', 'geheim');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
$query = "SELECT * FROM Auctions";
$result = mysql_query($query);
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
foreach($row as $field=>$value)
{
echo "$field: {$value} <br />";
}
}
mysql_close($link);
?>
Ve bu hatayı alıyorum:
Warning: mysql_fetch_array(): supplied argument is not a
valid MySQL result resource in
C:\Programme\EasyPHP 2.0b1\www\test.php on line 14
Ne eksik?