|
Posted by Richard Conway on 07/12/05 14:53
Luigi Donatello Asero wrote:
> Why do I get this error on the page
> https://www.scaiecat-spa-gigi.com/sv/test20.php
>
>
> Fatal error: Call to undefined function: mysql_fetch_col() in
> /home/s/scaiecat/www/sv/test20.php on line 7
>
>
> The code is:
>
>
> <html> <body>
> <?php $db = mysql_connect("local host", "user", "password");
> mysql_select_db("scaiecat", $db);
> $result = mysql_query("SELECT * FROM name of the table", $db);
> echo "<table border=1>\n"; echo "<tr><td>Region</td>
> <td>Ort</td><td>Sovplatser</td><td>Rum</td><td>Avstånd till havet i
> km</td><td>Terrass</td></tr>\n";
> while ($mycolumn=mysql_fetch_col($result))
> { printf("<tr><td>%s
> %s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n",
> $mycolumn[1], $mycolumn[2], $mycolumn[3]);
> }
> echo "</table>\n"; ?>
> </body>
> </html>
>
Try using mysql_fetch_array instead
[Back to original message]
|