inserting a paginator and tanella entering a group by not the right record count.
the problem is here :
The command GROUP BY on array [0], NOT EXIST:
[0] => SELECT COUNT(`docu`.`ID`) AS `docu.count` FROM `docs` AS `docu` WHERE `docu`.`DECORRENZA` <= '2017-02-02 19:47:04' AND `docu`.`SCADENZA` >= '2017-02-02 19:47:04' GROUP BY `docu.GRUPPO`;
[1] => SELECT `docu`.`ID` AS `docu.ID`, `docu`.`ID_REG` AS `docu.ID_REG`, `docu`.`INT_NUM` AS `docu.INT_NUM`, `docu`.`GRUPPO` AS `docu.GRUPPO`, `docu`.`TITOLO_SECT` AS `docu.TITOLO_SECT` FROM `docs` AS `docu` WHERE `docu`.`DECORRENZA` <= '2017-02-02 19:47:04' AND `docu`.`SCADENZA` >= '2017-02-02 19:47:04' GROUP BY `docu.GRUPPO` LIMIT 10;
the problem is here :
The command GROUP BY on array [0], NOT EXIST:
[0] => SELECT COUNT(`docu`.`ID`) AS `docu.count` FROM `docs` AS `docu` WHERE `docu`.`DECORRENZA` <= '2017-02-02 19:47:04' AND `docu`.`SCADENZA` >= '2017-02-02 19:47:04' GROUP BY `docu.GRUPPO`;
[1] => SELECT `docu`.`ID` AS `docu.ID`, `docu`.`ID_REG` AS `docu.ID_REG`, `docu`.`INT_NUM` AS `docu.INT_NUM`, `docu`.`GRUPPO` AS `docu.GRUPPO`, `docu`.`TITOLO_SECT` AS `docu.TITOLO_SECT` FROM `docs` AS `docu` WHERE `docu`.`DECORRENZA` <= '2017-02-02 19:47:04' AND `docu`.`SCADENZA` >= '2017-02-02 19:47:04' GROUP BY `docu.GRUPPO` LIMIT 10;
Hello salvok5,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How to debug database queries
How can I debug my form?
Is there a list of known bugs?
How can I validate and debug file uploads?
How can I edit my database table and debug queries?
P.S: I'm just an automated service😉
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How to debug database queries
How can I debug my form?
Is there a list of known bugs?
How can I validate and debug file uploads?
How can I edit my database table and debug queries?
P.S: I'm just an automated service😉
inserting a paginator and table entering a group by not the right record count.
the problem is here :
The command GROUP BY on array [0], NOT EXIST:
[0] => SELECT COUNT(`docu`.`ID`) AS `docu.count` FROM `docs` AS `docu` WHERE `docu`.`DECORRENZA` <= '2017-02-02 19:47:04' AND `docu`.`SCADENZA` >= '2017-02-02 19:47:04' GROUP BY `docu.GRUPPO`;
[1] => SELECT `docu`.`ID` AS `docu.ID`, `docu`.`ID_REG` AS `docu.ID_REG`, `docu`.`INT_NUM` AS `docu.INT_NUM`, `docu`.`GRUPPO` AS `docu.GRUPPO`, `docu`.`TITOLO_SECT` AS `docu.TITOLO_SECT` FROM `docs` AS `docu` WHERE `docu`.`DECORRENZA` <= '2017-02-02 19:47:04' AND `docu`.`SCADENZA` >= '2017-02-02 19:47:04' GROUP BY `docu.GRUPPO` LIMIT 10;
the problem is here :
The command GROUP BY on array [0], NOT EXIST:
[0] => SELECT COUNT(`docu`.`ID`) AS `docu.count` FROM `docs` AS `docu` WHERE `docu`.`DECORRENZA` <= '2017-02-02 19:47:04' AND `docu`.`SCADENZA` >= '2017-02-02 19:47:04' GROUP BY `docu.GRUPPO`;
[1] => SELECT `docu`.`ID` AS `docu.ID`, `docu`.`ID_REG` AS `docu.ID_REG`, `docu`.`INT_NUM` AS `docu.INT_NUM`, `docu`.`GRUPPO` AS `docu.GRUPPO`, `docu`.`TITOLO_SECT` AS `docu.TITOLO_SECT` FROM `docs` AS `docu` WHERE `docu`.`DECORRENZA` <= '2017-02-02 19:47:04' AND `docu`.`SCADENZA` >= '2017-02-02 19:47:04' GROUP BY `docu.GRUPPO` LIMIT 10;
Hi salvok5,
The count will not work with a group in the main query.
Go to the read_data function, add another model to the same table (New), give it a different model name, set the relation as "subquery join", in the relation conditions:
add the group field to this new model, and in the conditions of the main model, add:
The last line means to return only records with New.GRUPPO is not empty.
Best regards,
Max
The count will not work with a group in the main query.
Go to the read_data function, add another model to the same table (New), give it a different model name, set the relation as "subquery join", in the relation conditions:
docu.ID:New.New.ID
add the group field to this new model, and in the conditions of the main model, add:
New.GRUPPO:{value:true}
The last line means to return only records with New.GRUPPO is not empty.
Best regards,
Max
This topic is locked and no more replies can be posted.