SELECT GROUP_CONCAT to fetch id's works but is limited to a maximum number somehow, any help

so i use this code to autonumber some fields. works fine. but there is some limit in the concat. i’ve red that it was limited to 1500 but in scriptcase it’s much more limited, i think.

in other words, not each record is included in the var and i can’t find no option or anything to expand the number of items in the var or the concat. any suggestions?

$a = {START}+1;

somewhere i have to activate this ==> SET SESSION group_concat_max_len = 100000;
// Check for record
$check_sql = “SELECT GROUP_CONCAT(wk_id SEPARATOR’,’)”
. " FROM ILP_rooster"
. " WHERE ev_id = [ev_id] AND ronde_id > 1";
//. " ORDER BY ronde_id";
sc_lookup(rs, $check_sql);

if (isset({rs[0][0]})) // Row found
{rooster_id} = {rs[0][0]};

else // No row found

//{rooster_id} = ‘’;

$rooster_id = {rooster_id};

$rooster_var = (explode(",",$rooster_id));

//echo ‘-’; print_r($rooster_var); echo ‘-’;

foreach ($rooster_var as $wk_id) {

// SQL statement parameters
$update_table = ‘ILP_rooster’; // Table name
$update_where = “wk_id = ‘$wk_id’”; // Where clause
$update_fields = array( // Field list, add as many as needed
“wk_eduarte_lesnr = $a”,


// Update record
$update_sql = ‘UPDATE ’ . $update_table
. ’ SET ’ . implode(’, ', $update_fields)
. ’ WHERE ’ . $update_where;

echo " ==> ";
echo $wk_id;
echo " - ";
echo $a;
echo " | ";





  • This macro shows a Javascript alert message screen.
    $params = array(
    ‘title’ => ‘Lesnummers gekoppeld’,
    ‘type’ => ‘success’,
    ‘timer’ => ‘2000’,
    ‘showConfirmButton’ => false,
    ‘position’ => ‘center’,
    ‘toast’ => false

sc_alert(“Nummers succesvol gekoppeld”, $params);

Group_concat len is control by your instance of MySQL

SET GLOBAL group_concat_max_len = xxxxx; in your MySQL engine


sc_exec_sql(‘SET SESSION group_concat_max_len = 100000’);

Ah that did the trick!
btw Does this also work with the session time in scriptcase?

sc_exec_sql(‘set session.gc_maxlifetime = 14400’); in the onscripinit of the login page?

No, this is more tricky, and doesn’t work on all the server

This will work on most

ini_set(‘session.save_path’, “/home/web/session”);
ini_set(‘session.gc_maxlifetime’, 14400);

you may also have to set the cookie

ini_set(‘session.cookie_lifetime’, 14400);

then you have to restart the session, so do it in onApplicationinit of login.


But this will also restart your Scriptcase session if you do Run Project, so you may want to bypass it when you run locally

ini_set(‘session.save_path’, “/home/web/session”);

is the /home/web/session path standard on the local machine of the user? or should i use a different path?

or is it the path to a server directory and can i use http?

Not necessary, you can use any other path