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
 Share

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.

Edited by MisterCatapult
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...