Jump to content

Recommended Posts

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??

Link to comment
https://forums.phpfreaks.com/topic/194742-strange-group_concat-problem/
Share on other sites

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.

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

 

??

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.