Jump to content

Warning: Wrong parameter count for mysql_result() in /srv/disk4/741839/www/catapultphpmysql.eu.pn/testwebsite/index.html on line 136


TheCatapult

Recommended Posts

Bros, I would like to thank you for your help in my PHP. It worked now. But I am having problem displaying the data in database. Here's the code.

<?php$username="";$password="";$database="";mysql_connect("",$username,$password);@mysql_select_db($database) or die( "Unable to select database");$query="SELECT * FROM top10";$result=mysql_query($query);$num=mysql_numrows($result);mysql_close();$i=0;while ($i < $num) {$top10=mysql_result($result,$i,"one", "two" , "three", "four", "five", "six", "seven" , "eight", "nine", "ten");echo "$top10";$i++;}?>

Thanks! Please help.

Link to comment
Share on other sites

Check the manual for mysql_result, it has 2 required parameters and 1 optional parameter. You're trying to send it 12 parameters. http://www.php.net/manual/en/function.mysql-result.php You may want to use this instead, check the examples: http://www.php.net/manual/en/function.mysql-fetch-assoc.php

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...