Jump to content


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


Wrong parameter count for mysql_result

Recommended Posts

ok what i have is[code]
$turnupdate = mysql_result("SELECT lastran FROM cronjobs WHERE cronjob='turns';");[/code] when i try to take a result from my data base to display on my php page in getting [code]Warning: Wrong parameter count for mysql_result() in /home/pimpdomi/public_html/header.php on line 17[/code]

any idea's?

Share this post

Link to post
Share on other sites
mysql_result() is used to pull a specific value from a query. you're trying to use it to actually run your query. for instance:
// run a mysql query:
$turnupdate = mysql_query("SELECT lastran FROM cronjobs WHERE cronjob = 'turns'");

// get your result from that query:
$turn = mysql_result($turnupdate, 0);

hope this helps. look in the manual for a full description of the required arguments (as well as the optional ones) for mysql_result()

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.