grlayouts Posted September 11, 2006 Share Posted September 11, 2006 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 https://forums.phpfreaks.com/topic/20394-wrong-parameter-count-for-mysql_result/ Share on other sites More sharing options...
obsidian Posted September 11, 2006 Share Posted September 11, 2006 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 https://forums.phpfreaks.com/topic/20394-wrong-parameter-count-for-mysql_result/#findComment-89833 Share on other sites More sharing options...
grlayouts Posted September 11, 2006 Author Share Posted September 11, 2006 yeah thats got it, thank you so much.. Link to comment https://forums.phpfreaks.com/topic/20394-wrong-parameter-count-for-mysql_result/#findComment-89864 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.