Jump to content

Wrong parameter count for mysql_result


grlayouts

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?
Link to comment
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:
[code]
<?php
// 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);
?>
[/code]

hope this helps. look in the manual for a full description of the required arguments (as well as the optional ones) for mysql_result()
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.