Reply to Re: Mysql_fetch_col()

Your name:

Reply:


Posted by Luigi Donatello Asero on 07/12/05 15:52

"Richard Conway" <ric@shoe.com> skrev i meddelandet
news:NOOAe.4096$2I4.2995@fe05.ams...
> Luigi Donatello Asero wrote:
> > "Richard Conway" <ric@shoe.com> skrev i meddelandet
> > news:FaOAe.2$HQ1.0@fe08.ams...
> In that case, there is something wrong with your query. Try changing
> the following line from:
>
> $result = mysql_query("SELECT * FROM name of the table", $db);
>
> to:
>
> $result = mysql_query("SELECT * FROM name of the table", $db) or
> die(mysql_error());
>
> This will trap the error and output it for you so you can get some idea
> of where you've gone wrong.

After some changes:

<html> <body>
<?php $db = mysql_connect("localhost", "user",
"password");
mysql_select_db("databas", $db);
$result = mysql_query("SELECT * FROM table", $db) or
die(mysql_error());
echo "<table border=1>\n"; echo "<tr><th>Region</th>
<th>Ort</th><th>Sovplatser</th><th>Rum</th><th>Avstεnd till havet i
km</th><th>Terrass</th></tr>\n";
while ($mycolumn=mysql_fetch_array ($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]
$mycolumn[4],$mycolumn[5],$mycolumn[6]);
}
echo "</table>\n"; ?>
</body>
</html>


I get
Parse error: parse error, unexpected T_VARIABLE in
/home/s/scaiecat/www/sv/test20.php on line 10


I do not understand yet, what is wrong.



--
Luigi Donatello (un italiano che vive in Svezia)
https://www.scaiecat-spa-gigi.com/

[Back to original message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация