Porkie Posted July 6, 2009 Share Posted July 6, 2009 what am <?php $con = mysql_connect(""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("", $con); $count = "SELECT COUNT(id) FROM gg_video"; echo '</td>'; echo '</tr>'; echo "Currently['$count'] Videos"; ?> i doing wrong when showing queries? cheers Quote Link to comment https://forums.phpfreaks.com/topic/164960-echo-queries/ Share on other sites More sharing options...
Maq Posted July 6, 2009 Share Posted July 6, 2009 Do you want to show the query or the returned values? Quote Link to comment https://forums.phpfreaks.com/topic/164960-echo-queries/#findComment-869832 Share on other sites More sharing options...
Porkie Posted July 6, 2009 Author Share Posted July 6, 2009 returned value please mate, thanks Quote Link to comment https://forums.phpfreaks.com/topic/164960-echo-queries/#findComment-869833 Share on other sites More sharing options...
Maq Posted July 6, 2009 Share Posted July 6, 2009 Try: $count = "SELECT COUNT(id) FROM gg_video"; $result = mysql_query($count); $row = mysql_fetch_array($result); echo ''; echo ''; echo "Currently {$row['COUNT(id)']} Videos"; Quote Link to comment https://forums.phpfreaks.com/topic/164960-echo-queries/#findComment-869835 Share on other sites More sharing options...
Porkie Posted July 6, 2009 Author Share Posted July 6, 2009 still shows nothing mate, any reason why? cheers Quote Link to comment https://forums.phpfreaks.com/topic/164960-echo-queries/#findComment-869838 Share on other sites More sharing options...
will35010 Posted July 6, 2009 Share Posted July 6, 2009 still shows nothing mate, any reason why? cheers try: $count = "SELECT COUNT(id) FROM gg_video"; $result = mysql_query($count); $row = mysql_fetch_array($result); echo '</td>'; echo '</tr>'; echo "Currently ".{$row['COUNT(id)']}." Videos"; [/code Quote Link to comment https://forums.phpfreaks.com/topic/164960-echo-queries/#findComment-869843 Share on other sites More sharing options...
Porkie Posted July 6, 2009 Author Share Posted July 6, 2009 sorted now cheers everyone Quote Link to comment https://forums.phpfreaks.com/topic/164960-echo-queries/#findComment-869868 Share on other sites More sharing options...
Maq Posted July 6, 2009 Share Posted July 6, 2009 Mind sharing? Quote Link to comment https://forums.phpfreaks.com/topic/164960-echo-queries/#findComment-869871 Share on other sites More sharing options...
will35010 Posted July 7, 2009 Share Posted July 7, 2009 Mind sharing? guess he does mind...lol. Quote Link to comment https://forums.phpfreaks.com/topic/164960-echo-queries/#findComment-870153 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.