my master grid is:
$grid->select_command = “SELECT Droits, DateRamasse , sum(NB_PALETTES) as Qpal FROM RESULTATS GROUP BY DateRamasse “;
DateRamasse is a date
i want to pass this date to detail:
$opt[“subgridparams”] = “Droits,DateRamasse”;
in detail I do:
$Ram = $_GET[“DateRamasse”];
$Droit = $_GET[“Droits”];
but I don’t get my date ($Ram) to prepare my detail
$grid->select_command = “SELECT * FROM RESULTATS WHERE Droits = ‘”.$userdroits.”‘ AND DateRamasse = “.$Ram;
where is the problem?
problem of date ?
probleme with subgridparams?
Thanks
Hi,
In query:
$grid->select_command = "SELECT * FROM RESULTATS WHERE Droits = '".$userdroits."' AND DateRamasse = '".$Ram."'";
I think, the date field needs to be enclosed in quotes.
Also open the debug console (ctrl+shift+c) and then network tab, and check if the parameters are shown correctly in the ajax call.
Share some screenshot / screen-recording if not solved.
Hi Abu,
I ‘ve tried with quotes too, without effect.
in MARIADB database, dates are ‘Y-m-d’ ex: 2024-11-29
I dont’ know how to be sure of date format in grids
first I wanted so display d/m/Y (french format). It was OK but maybe it was the problem
So i used format Y-m-d , but same problem (grid displays Y/m/d)
i think that it is a problem of SQL format but I can’t solve it.
Regards
Georges