From d160dbb64e14dfd2a80ddf1bc6fe94044be9965b Mon Sep 17 00:00:00 2001 From: sparkyx Date: Sun, 19 Oct 2025 17:43:44 +0200 Subject: [PATCH] Data_SQL & Table_Data_SQL : document. virtual_col --- include/lib/table_data_sql.class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/lib/table_data_sql.class.php b/include/lib/table_data_sql.class.php index f81d4c0ed..b774d7fc4 100644 --- a/include/lib/table_data_sql.class.php +++ b/include/lib/table_data_sql.class.php @@ -35,7 +35,7 @@ * - type = array , match between column and type of data * - default = array of column with a default value * - date_format = format of the date - * + * - virtual_col * After you call the parent constructor * @note the view or the table must include an unique key, otherwise the load * doesn't work. @@ -83,7 +83,12 @@ } * @endcode - * + * it is also possible to use set_virtual_col to format data directly in the + * SQL + * @see Data_SQL + @code + $jrn->set_virtual_col("str_date", " to_char(jr_tech_date,'DD/MM/YY HH24:MI')"); + @endcode */ #[AllowDynamicProperties] abstract class Table_Data_SQL extends Data_SQL