Datagrid 7.x.x Error DATE FROM TO

All ApPHP DataGrid script bugs discussion. Questions and requests here.
Please, use a $debug_mode = true; before you say "Why Nothing Works ?!" (solves 90% of all issues)

Moderator: alexandrleonenko

ciruzz000
Expert
Expert
Posts: 68
Joined: Jan 28th, '10, 12:15

Datagrid 7.x.x Error DATE FROM TO

Postby ciruzz000 » Sep 9th, '13, 10:55

I have a problem with datagrid (7.7.7 and 7.9.9) with the date.
Example:
I have a query "date between '2013-08-10' AND '2013-08-12'" but i visualize only 2013-08-10 and 2013-08-11 and NOT 2013-08-12...
I have the problem with all queries and also with filters......
And when i filter with 1 day the query is empty, but the query on db is ok!
HELP!!!!!!!

Code: Select all

SELECT interventi.INT_SEQ,INT_DATA,id_tipo_operatore,note,prestazioni.PRE_NOMPRE,COUNT(INT_DATA) AS conta ,INT_NOMPAZ,PAZ_COGNOME,PAZ_NOME,id_paziente,approvato,CONCAT(PAZ_COGNOME,' ',PAZ_NOME) AS paziente,eseguito,SUM(durata+durata_aggiunta)+IF(aggiunta is Null,'0',aggiunta) AS durat,(SUM(durata+durata_aggiunta)+IF(aggiunta is Null,'0',aggiunta))/60 AS durath,id_richiesta_asl,GROUP_CONCAT(if(eseguita=1,CONCAT('',PRE_CODPRE,''),CONCAT('',PRE_CODPRE,''))) AS prest,DATE_FORMAT(INT_DATA,'%d-%m-%Y') AS dataint,OPE_COGNOME,OPE_NOME,approvato,CONCAT(OPE_COGNOME,' ',OPE_NOME) AS operatore,IF(eseguito='1' AND bb_ts_inizio Is Not Null,DATE_FORMAT(interventi.ts_aggiornamento,'%H:%i'),'') AS ora_chiusura,IF(eseguito=1,TIMESTAMPDIFF(MINUTE,bb_ts_inizio,bb_ts_fine),'') AS tempoimp,'Chiudi' AS ch,'Clona' AS clon,PAZ_DISTRE FROM ((((`tabella interventi` AS interventi INNER JOIN tabella_pazienti ON interventi.id_paziente=tabella_pazienti.id) INNER JOIN operatori ON interventi.id_operatore=operatori.id) INNER JOIN interventi_prestazioni ON interventi.INT_SEQ=interventi_prestazioni.id_intervento) INNER JOIN prestazioni ON interventi_prestazioni.id_prestazione=prestazioni.id) LEFT JOIN interventi_aggiunta ON interventi_aggiunta.id_intervento=interventi.INT_SEQ WHERE 1=1 AND INT_DATA>='2013-09-09' AND INT_DATA<='2013-09-09' AND ( LCASE(interventi.INT_DATA) >= '2013-09-09' AND LCASE(interventi.INT_DATA) <= '2013-09-09' )GROUP BY INT_DATA,id_paziente,id_operatore,INT_SEQ ORDER BY INT_DATA ASC, id_paziente ASC, interventi.id_operatore ASC, INT_SEQ ASC LIMIT 0, 50

ciruzz000
Expert
Expert
Posts: 68
Joined: Jan 28th, '10, 12:15

Re: Datagrid 7.x.x Error DATE FROM TO

Postby ciruzz000 » Sep 9th, '13, 11:08

i have this problem with the PHP version 5.3.26 and 5.5.31 of mysql.........

administrator
Site Admin
Site Admin
Posts: 5997
Joined: Jan 7th, '09, 23:18
Contact:

Re: Datagrid 7.x.x Error DATE FROM TO

Postby administrator » Sep 10th, '13, 07:16

Please post a link to your page and show us this issue online.

ciruzz000
Expert
Expert
Posts: 68
Joined: Jan 28th, '10, 12:15

Re: Datagrid 7.x.x Error DATE FROM TO

Postby ciruzz000 » Sep 10th, '13, 08:19

https://www.webadi.it/accessitest.php
In the db the query is ok (I took the query debugging....) I attached the query's image

administrator
Site Admin
Site Admin
Posts: 5997
Joined: Jan 7th, '09, 23:18
Contact:

Re: Datagrid 7.x.x Error DATE FROM TO

Postby administrator » Sep 11th, '13, 06:58

Ok, I see now.
Do you mean this query doesn't work?

Code: Select all

INT_DATA>='2013-09-09' AND INT_DATA<='2013-09-09'


You may define:
From field to use ">=" sign
To field to use "<" sign,

so the query will look
DATA >= '2013-09-09' AND DATA < '2013-09-10'

ciruzz000
Expert
Expert
Posts: 68
Joined: Jan 28th, '10, 12:15

Re: Datagrid 7.x.x Error DATE FROM TO

Postby ciruzz000 » Sep 11th, '13, 07:51

yes, but in this may I have to put in date range 2 different date and not the same date... (for a 1 day search)

ciruzz000
Expert
Expert
Posts: 68
Joined: Jan 28th, '10, 12:15

Re: Datagrid 7.x.x Error DATE FROM TO

Postby ciruzz000 » Sep 11th, '13, 12:26

the problem is on field DATETIME only on OS Linux!!!! :shock: :shock:
with all version 5.x of php... I have to try only the version 5.4
Help for me?!??!

administrator
Site Admin
Site Admin
Posts: 5997
Joined: Jan 7th, '09, 23:18
Contact:

Re: Datagrid 7.x.x Error DATE FROM TO

Postby administrator » Sep 12th, '13, 10:31

This will help you to search for one day only!
DATA >= '2013-09-09' AND DATA < '2013-09-10'

otherwise you have to define this field as a "date", not a "datetime"


Return to “ApPHP DataGrid {bugs}”