[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16623]
From: |
nelson . guerra |
Subject: |
[Fmsystem-commits] [16623] |
Date: |
Wed, 26 Apr 2017 00:49:35 -0400 (EDT) |
Revision: 16623
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16623
Author: nelson224
Date: 2017-04-26 00:49:35 -0400 (Wed, 26 Apr 2017)
Log Message:
-----------
Modified Paths:
--------------
branches/dev-syncromind-2/property/inc/class.soreport.inc.php
Modified: branches/dev-syncromind-2/property/inc/class.soreport.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.soreport.inc.php
2017-04-25 12:08:35 UTC (rev 16622)
+++ branches/dev-syncromind-2/property/inc/class.soreport.inc.php
2017-04-26 04:49:35 UTC (rev 16623)
@@ -193,6 +193,45 @@
return $values;
}
+ function get_columns_data ( $id )
+ {
+ $id = (int)$id;
+
+ $dataset = $this->read_single_dataset($id);
+
+ $sql = "SELECT column_name, data_type
+ FROM information_schema.columns
+ WHERE table_name = '".$dataset['view_name']."'
+ ORDER BY ordinal_position";
+ $this->db->query($sql, __LINE__, __FILE__);
+
+ $columns = array();
+
+ while ($this->db->next_record())
+ {
+ $columns[] = array
+ (
+ 'name' => $this->db->f('column_name')
+ );
+ }
+
+ $sql = "SELECT * FROM ".$dataset['view_name'];
+ $this->db->limit_query($sql, 0, __LINE__, __FILE__, 30);
+
+ $values = array();
+ while ($this->db->next_record())
+ {
+ $value = array();
+ foreach ($columns as $column)
+ {
+ $value[$column] = $this->db->f($column);
+ }
+ $values[] = $value;
+ }
+
+ return $values;
+ }
+
function build_sum_of_colums($columns)
{
$columns_a = array_values($columns);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16623],
nelson . guerra <=