Cells layout header information get from a php script

Hello,

I have a layout with 3 cells. In cell “b”, I have a grid.
I would write in the header of the cell, the hour of last update.

here is my piece of code in php.
heure.php:

<?php // on se connecte à notre base $base= mysql_connect("localhost","xxxx","yyyyy"); if (!$base) { die('Connexion impossible: ' . mysql_error()); } mysql_select_db ('Dwh_Unimag', $base) ; $sql = 'SELECT * FROM Compteurs'; // on lance la requête (mysql_query) et on impose un message d'erreur si la requête ne se passe pas bien (or die) $req = mysql_query($sql) or die('Erreur SQL ! '.$sql.' '.mysql_error()); $data = mysql_fetch_array($req); $hour = $data['Last_Time_Upload']; mysql_free_result ($req); mysql_close (); ?>

Here is a screenshot.

How can I do this ?

Thnaks for your help.


Hi,
to read php.net/manual/en/book.datetime.php

Ivan,

It’s not the answer I’m expecting.
I’m uploading sales tickets informations on a datawarehouse.
I update a table “compteurs” with information for the next uploading and I keep the hour of the last uploading.
I would put in the header of the cell “b” of my layout this hour.
I don’t know how to do this not how to get a timestamp.
I get the hour in a json format with a small php script “heure.php”.

Thanks for help.
Regards.

You can use code like layout.cells(“b”).setText(string) to set any text in the header of panel.
How data is retrieved from server side is depends on your code organization, it can be loaded in grid along with the data ( by using global user data of grid ) or it can be loaded by separate ajax request.