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] 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] 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 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
Archived
This topic is now archived and is closed to further replies.