mabog Posted March 10, 2010 Share Posted March 10, 2010 When adding GROUP_CONCAT to the query, row count is: Showing rows 0 - 0 (1 total, Query took 0.0224 sec) Without GROUP_CONCAT: Showing rows 0 - 4 (5 total, Query took 0.0215 sec) So in the first case mysql_num_rows() doesn't work anymore EVEN query result (via PHPMySQL) is OK! Why row count is zero?? Quote Link to comment https://forums.phpfreaks.com/topic/194742-strange-group_concat-problem/ Share on other sites More sharing options...
mabog Posted March 11, 2010 Author Share Posted March 11, 2010 It's PHPMyAdmin, not PHPMySQL :-\ Still need help with this "showing rows 0-0" :'( Quote Link to comment https://forums.phpfreaks.com/topic/194742-strange-group_concat-problem/#findComment-1024706 Share on other sites More sharing options...
fenway Posted March 15, 2010 Share Posted March 15, 2010 Really? You asked mysql to group everything into a single record -- and it did -- so why are you blaming a function? Quote Link to comment https://forums.phpfreaks.com/topic/194742-strange-group_concat-problem/#findComment-1026485 Share on other sites More sharing options...
mabog Posted March 16, 2010 Author Share Posted March 16, 2010 Really? You asked mysql to group everything into a single record -- and it did -- so why are you blaming a function? It's not a single record, it's 5 rows, in both cases. But with GROUP_CONCAT row count is zero even rows are visible! Anyway I solved this with second query and with simple php comparison. Quote Link to comment https://forums.phpfreaks.com/topic/194742-strange-group_concat-problem/#findComment-1026896 Share on other sites More sharing options...
fenway Posted March 16, 2010 Share Posted March 16, 2010 There is no possible way that with and without group-concat you get the same number of rows. Quote Link to comment https://forums.phpfreaks.com/topic/194742-strange-group_concat-problem/#findComment-1026907 Share on other sites More sharing options...
mabog Posted March 16, 2010 Author Share Posted March 16, 2010 There is no possible way that with and without group-concat you get the same number of rows. OK. Can't remember anymore was there 3 or 4 or 5 rows but at least there was few. But still 'showing rows 0-0' ... Quote Link to comment https://forums.phpfreaks.com/topic/194742-strange-group_concat-problem/#findComment-1027006 Share on other sites More sharing options...
fenway Posted March 18, 2010 Share Posted March 18, 2010 But still "1 total". Quote Link to comment https://forums.phpfreaks.com/topic/194742-strange-group_concat-problem/#findComment-1027953 Share on other sites More sharing options...
mabog Posted March 18, 2010 Author Share Posted March 18, 2010 But still "1 total". Which is incorrect because there was more than 1 row. But I tested that query again, with / without group_concat: Without: Showing rows 0 - 7 (8 total, Query took 0.0218 sec), 8 rows visible With: Showing rows 0 - 0 (1 total, Query took 0.0220 sec), 8 rows visible ?? Quote Link to comment https://forums.phpfreaks.com/topic/194742-strange-group_concat-problem/#findComment-1027969 Share on other sites More sharing options...
fenway Posted March 20, 2010 Share Posted March 20, 2010 Show both result sets. Quote Link to comment https://forums.phpfreaks.com/topic/194742-strange-group_concat-problem/#findComment-1029303 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.