Jump to content

Archived

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

balkan7

MySQL Query Error

Recommended Posts

Warning: Wrong parameter count for mysql_query()

[code]$query = mysql_query ($dbname,"select * from top_cats order by catname",$db) or die (mysql_error());[/code]

Share this post


Link to post
Share on other sites
You are not using it correctly. Refer to the [url=http://uk.php.net/mysql_query]documentation[/url] on how to correctly use it.

Share this post


Link to post
Share on other sites
Mysql query only has two parameters. Your code code has three parameters. The only parameters mysql_query has is the query and the secound parameter which is optional is the link identify to the mysql connection. So this is what the line should look like:
[code]$query = mysql_query ("select * from top_cats order by catname") or die (mysql_error());[/code]

Share this post


Link to post
Share on other sites
thank you, i was try whit include datebase but show me error, i fix now, thanks again.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.