Visualizzazione dei risultati da 1 a 7 su 7
  1. #1
    Utente di HTML.it
    Registrato dal
    Nov 2007
    Messaggi
    202

    grosso problema con la funzione GROUP_CONCAT: + di tot mi taglia i risultati. why?

    ciao, ho un grosso problema con la funzione GROUP_CONCAT nella query sul MYSQL.

    TABELLA 1 e TABELLA 2

    mi sono accorto che se nella seconda tabella ho + di 30 righe, che devo fare comparire nella pagina tramite il GROUP_CONCAT, mi taglia la stringa.

    come separatore ho usato un # che poi tramite un

    Codice PHP:
    for ($i 0$i count($arr_dati); $i++) { 
    e una tabella, ho elencato i valori. Com'è possibile sta cosa? possibile che ci sia un limite?

    che quando lui raggruppa i dati con # raggiunga un numero di caratteri limite? a me sembra strana come cosa... ho provato a fare dei test tipo prendere i primi 5 valori
    Codice PHP:
    for ($i 0$i 5 $i++) { 
    e nn mi taglia nulla. mi aiutate?

  2. #2
    Utente di HTML.it
    Registrato dal
    Nov 2007
    Messaggi
    202

  3. #3
    Utente di HTML.it
    Registrato dal
    Nov 2007
    Messaggi
    202
    nel manuale del mysql dice questo:

    codice:
     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. The value can be set higher, although the effective maximum length of the return value is constrained by the value of max_allowed_packet. The syntax to change the value of group_concat_max_len at runtime is as follows, where val  is an unsigned integer:
    
    SET [SESSION | GLOBAL] group_concat_max_len = val;
    
    Beginning with MySQL 5.0.19, the type returned by GROUP_CONCAT() is always VARCHAR unless group_concat_max_len is greater than 512, in which case, it returns a BLOB. (Previously, it returned a BLOB with group_concat_max_len greater than 512 only if the query included an ORDER BY clause.)
    cosa vuol dire? come si fa per modificare il numero dei caratteri? dov'è ke devo andare?

  4. #4
    Utente di HTML.it
    Registrato dal
    Nov 2007
    Messaggi
    202
    boh

  5. #5
    mi associo alla tua richiesta! ?? :master:
    www.skorpiograph.com - [ PORTFOLIO ]
    ...se vuoi essere aiutato devi aiutare chi ti aiuta ad aiutarti!!!

  6. #6
    OK! ho trovato e funziona alla grande:

    mysql_query("SET SESSION group_concat_max_len = 10240");

    da inserire prima della query con GROUP_CONCAT

    oppure

    mysql_query("SET GLOBAL group_concat_max_len = 10240");

    ciaooooo
    www.skorpiograph.com - [ PORTFOLIO ]
    ...se vuoi essere aiutato devi aiutare chi ti aiuta ad aiutarti!!!

  7. #7
    Utente di HTML.it
    Registrato dal
    Nov 2007
    Messaggi
    202
    nooooooooooooooo, grande CeMax! E io che ho dovuto fare due tabelle separate.. che rabbia!!! grande grande!!! cosi almeno riesco ad avere + risultati senza parole tagliate

    Grazieeeee!!!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.