Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9238889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:51:52+00:00 2026-06-18T07:51:52+00:00

I have a problem with group_concat in mysql query : It stops on 513

  • 0

I have a problem with group_concat in mysql query :

It stops on 513 number !

This is the normal query and it returns 813 rows :

SELECT * 
FROM survey_votes
WHERE sid =  '4'

and now the problem is with this query:

SELECT s.*,     
    GROUP_CONCAT(v.oid) AS myoids
    FROM survey s
    LEFT JOIN survey_votes v ON s.sid=v.sid
    WHERE s.sid='4'

This returns 1 row containing an array ‘myoids’ up to 513 strings.

strucutr of table ‘survey’:

sid  int(11)          
stitle   varchar(255)
sdesc    text     
soptions text    
sdate    datetime  
active   int(1)

survey_votes:

vid int(11) 
sid int(11)     
uid int(11)     
uip varchar(255)    
oid int(11)     
sdate   datetime

myoids only contains upto 513 rows :

Array
(
    [0] => 1
    [1] => 1
    [2] => 3
    .........
    [511] => 1
    [512] => 
)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T07:51:53+00:00Added an answer on June 18, 2026 at 7:51 am

    This is because MySQL truncates the result of GROUP_CONCAT after a certain limit:

    The result is truncated to the maximum length that is given by the
    group_concat_max_len system variable, which has a default value of
    1024.

    Try increasing the value of group_concat_max_len variable using the SET command:

    SET SESSION group_concat_max_len = 1024 * 1024; -- 1MB
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a SQL Query: SELECT mealdesc, group_concat(fooddesc) as fooddesc FROM plan p INNER
I have some problem converting a MYSQL query to CI syntax. This my MySQL
i have problem with this code: $comments->query = SELECT . PREFIX . _comments.id, post_id,
I have little problem with mysql query. I need something like GROUP_CONCAT in GROUP_CONCAT.
i have a problem during count data use this query: SELECT A.*, COUNT( B.Serial_number
I have problem with my query on C, I’m using the oci8 driver. This
I have a problem incorporating a Group_Concat function in my SQL query. I have
I have a query which uses the GROUP_CONCAT of mysql on an integer field.
I have the following MySQL query: SELECT posts.id, posts.name, LEFT(posts.content, 400), posts.author, posts.date, users.display_name,
So, I have this query in PHP which is working as intended: SELECT files.ID,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.