AdRock Posted September 6, 2006 Share Posted September 6, 2006 I have got my image gallery but i want to display what image number it is on and how many images there are so it appears something like [b]1 of 26[/b]I am having trouble with the SELECT COUNT bit as it says on the output [b]6 of Resource id #8[/b] 6 being the id number of the image[code]$page = $_GET['id'];$count = mysql_query("SELECT COUNT(*) FROM images");.........echo($page." of ".$count);[/code] Quote Link to comment https://forums.phpfreaks.com/topic/19938-how-to-use-select-count-resolved/ Share on other sites More sharing options...
sasa Posted September 6, 2006 Share Posted September 6, 2006 try[code]echo $count1 = mysql_result($count,0,0);[/code] Quote Link to comment https://forums.phpfreaks.com/topic/19938-how-to-use-select-count-resolved/#findComment-87345 Share on other sites More sharing options...
AdRock Posted September 6, 2006 Author Share Posted September 6, 2006 Thanks sasaI just added your code to my echo to make[code]echo ($page." of ".$count1 = mysql_result($count,0,0));[/code]and now it works Quote Link to comment https://forums.phpfreaks.com/topic/19938-how-to-use-select-count-resolved/#findComment-87358 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.