Hello,
I am trying to display discrency on 2 mass. Value is calculated in the SQL query like this
SELECT
id,
Tank,
Mass,
Mass_sap,
Mass_sap-Mass AS Discrepency2,
CASE
WHEN abs(Mass_sap-Mass) > 1000 THEN CONCAT(\'<font color=red>\’,Mass_sap-Mass,\'</font>\’)
ELSE CONCAT(\'<font color=black>\’,Mass_sap-Mass,\'</font>\’)
END as Discrepency
FROM tank
but the field is always empty..
$col = array();
$col[“title”] = “Discrepency”;
$col[“name”] = “Discrepency”;
$col[“width”] = “30”;
$cols[] = $col;
no matter what I do…
is this a limitation of the grid?
The query works fine on an sql editor or another php grid..
Thanks for your help
Cedric
Please refer this demo code, line 100:
https://gist.github.com/gridphp/b37faca7a4173222a5eaeb1ecc7733ef
I removed backslash \ from query and working as expected, tested on mysql.
What could be the issue then?
I review the code, and have the exact same
What could be preventing the display of Discrepency or Discrepency2 ?
If you don’t see the columns on grid, there is possibility that they are hidden due to screen size.
You can turn off responsive:false and recheck.
$opt[“responsive”] = false;
// …
$g->set_options($opt);
Please come on google hangouts, i think we need a remote desktop session here.
It’s late here, so i’m taking off now. Let me know your feasible time and time zone if you need session.
Hello Abu,
It was late for me too.
I sent you an hangout invite. Let me know if you have any free time today