Helix Installation   Getting Started   Reference Documentation   Global Functions   Quick Start
ModulesClassesFunctions
 

Class Reference

class mysql extends obj implements dbi

Helix obj mysql
Hide Inherited MembersHelix Core
Description
No description.
 
Constants
No constants.
 
Properties
publicdatabase[ mysql ]
protected_dirty[ obj ]
publicerrno[ mysql ]
publicerror[ mysql ]
publichost[ mysql ]
publicinsert_id[ mysql ]
publicle[ mysql ]
publiclid[ mysql ]
publicpassword[ mysql ]
publicport[ mysql ]
publicproperty_objects_array[ obj ]
public_q[ mysql ]
publicqid[ mysql ]
publicre[ mysql ]
publicrecord[ mysql ]
publicrow[ mysql ]
publicserver_type[ mysql ]
publicusername[ mysql ]
 
Methods
publicadd_column ( tablename , properties )[ mysql ]
Parameters
requiredtablename
requiredproperties
Code
282  public function add_column($__tablename,$__properties)
283  {
284      return true;
285  }
publicadd_table ( properties , enforce_constraints [true] )[ mysql ]
Parameters
requiredproperties
optionalenforce_constraints [true]
Code
307  public function add_table($__properties,$__enforce_constraints=true)
308  {
309      return true;
310  }
publicaffected_rows ( )[ mysql ]
Parameters
No parameters for this method
Code
407  function affected_rows()
408  {
409      if ($this->qid)
410      {
411          return @mysql_affected_rows($this->lid);
412      }
413      else
414      {
415          return false;
416      }
417  }
publicconnect ( )[ mysql ]
Parameters
No parameters for this method
Code
034  public function connect(){
035      if ($this->lid == 0)
036      {
037          try
038          {
039              $this->lid = mysql_connect($this->host,$this->username,$this->password);
040          }
041          catch (Exception $e)
042          {
043              echo "<BR>Exception: ".$e->getMessage()."\n";
044              echo "<BR>Can't connect to ".$this->host." using user:".$this->username."\n";
045          }
046          if (!$this->lid)
047          {
048              $this->halt("Cannot connect to database server: $this->host",true);
049              return false;
050          }
051      }
052 
053      if (strlen($this->database) > 0)
054      {
055          if (!@mysql_select_db($this->database,$this->lid))
056          {
057              $this->halt("Cannot connect to database: " . $this->database);
058              return false;
059          }
060     
061      }
062      return $this->lid;
063  }
public__construct ( host ["localhost"] , database , username , password , port [3306] )[ mysql ]
Parameters
optionalhost ["localhost"]
optionaldatabase
optionalusername
optionalpassword
optionalport [3306]
Code
025  public function __construct($__host='localhost',$__database=null,$__username=null,$__password=null,$__port=3306){
026      $this->host = (is_null($__host))?$this->host:$__host;
027      $this->database = (is_null($__database))?$this->database:$__database;
028      $this->username = (is_null($__username))?$this->username:$__username;
029      $this->password = (is_null($__password))?$this->password:$__password;
030      $this->port = (is_null($__port))?$this->port:$__port;
031      $this->lid=0;
032  }
publicdrop_column ( tablename , columnname , enforce_constraints [true] )[ mysql ]
Parameters
requiredtablename
requiredcolumnname
optionalenforce_constraints [true]
Code
287  public function drop_column($__tablename,$__columnname,$__enforce_constraints=true)
288  {
289      if(!$__enforce_constraints)
290      {
291          $q = array();
292          $q[] = "SET SQL_MODE='';";
293          $q[] = "SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;";
294          $q[] = "SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO';";
295          $q[] = "alter table {$this->le}{$__tablename}{$this->re} drop column {$this->le}$__columnname{$this->re};";
296          $q[] = "SET SQL_MODE=@OLD_SQL_MODE;";
297          $q[] = "SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;";
298      }
299      else
300      {
301          $q= "alter table {$this->le}{$__tablename}{$this->re} drop column {$this->le}$__columnname{$this->re};";
302      }
303     
304      return true;
305  }
publicdrop_database ( )[ mysql ]
Parameters
No parameters for this method
Code
365  public function drop_database()
366  {
367      $q = "DROP DATABASE {$this->database};";   
368      $this->query($q);
369      return true;
370  }
publicdrop_table ( tablename , enforce_constraints [true] )[ mysql ]
Parameters
requiredtablename
optionalenforce_constraints [true]
Code
312  public function drop_table($__tablename,$__enforce_constraints=true)
313  {
314      if(!$__enforce_constraints)
315      {
316          $q = array();
317          $q[] = "SET SQL_MODE='';";
318          $q[] = "SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;";
319          $q[] = "SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO';";
320          $q[] = "DROP table $__tablename;";
321          $q[] = "SET SQL_MODE=@OLD_SQL_MODE;";
322          $q[] = "SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;";
323      }
324      else
325      {
326          $q = "DROP table $__tablename;";   
327      }
328     
329      $this->query($q);
330     
331      return true;
332  }
publicempty_database ( enforce_constraints [true] )[ mysql ]
Parameters
optionalenforce_constraints [true]
Code
372  public function empty_database($__enforce_constraints=true)
373  {
374      foreach($this->table_list as $tablename)
375      {
376          $this->drop_table($tablename,$__enforce_constraints);
377      }
378      return true;
379  }
publicfound_rows ( )[ mysql ]
Parameters
No parameters for this method
Code
389  function found_rows()
390  {
391      // USE SELECT SQL_CALC_FOUND_ROWS TO GET COUNT BEFORE LIMIT IS APPLIED
392      return keyval(@mysql_fetch_array(@mysql_query("SELECT FOUND_ROWS();",$this->lid)),0);
393  }
public__get ( p )[ obj ]
Parameters
requiredp
Code
007  public function __get($p)
008  {
009      $methods = get_class_methods($this);
010      $properties = get_object_vars($this);
011      if (in_array("get_$p",$methods))
012      {
013          return $this->{"get_$p"}();
014      }
015      else if (array_key_exists("_$p",$properties))
016      {
017          return $this->{"_$p"};
018      }
019      else if (in_array("get_" . substr($p,strpos($p,"_")+1), $methods))
020      {
021          return $this->{"get_" . substr($p,strpos($p,"_")+1)}(substr($p,0,strpos($p,"_")));
022      }
023      else
024      {
025          trigger_error("This object [" . get_class($this) . ":$this->id] has no private property '_$p' for the requested public property '$p'",E_USER_WARNING);
026          return null;
027      }
028  }
publicget_array ( )[ obj ]
Parameters
No parameters for this method
Code
096  public function get_array()
097  {
098      return get_object_vars($this);
099  }
publicget_classname ( )[ obj ]
Parameters
No parameters for this method
Code
086  public function get_classname()
087  {
088      return get_class($this);
089  }
publicget_column_list ( tablename , search )[ mysql ]
Parameters
requiredtablename
optionalsearch
Code
171  public function get_column_list($__tablename,$__search=null){
172      $columns = array();
173      $q = "SHOW COLUMNS in $__tablename";
174      if(!is_null($__search))
175      {
176          $q.=" WHERE Field LIKE '{$__search}'";
177      }
178      $this->query($q);
179      while ($this->next_record())
180      {
181          $columname = $this->record[0];
182          $columns[]=$columname;
183      }
184     
185      return $columns;
186  }
publicget_database_list ( )[ mysql ]
Parameters
No parameters for this method
Code
267  public function get_database_list(){
268      $table = array();
269      $q = "SHOW DATABASES;";
270      $this->query($q);
271      while ($this->next_record())
272      {
273          $dbname = $this->record[0];
274          $table[]=$dbname;
275      }
276     
277      $table=array_unique($table);
278      sort($table);
279      return $table;
280  }
publicget_dirty ( )[ obj ]
Parameters
No parameters for this method
Code
063  public function get_dirty()
064  {
065      if ($this->id === 0)
066      {
067          $this->_dirty = true;
068      }
069      else
070      {
071          foreach (get_object_vars($this) as $k=>$v)
072          {
073              if ($this->_dirty)
074              {
075                  break;
076              }
077              if (preg_match('/_dirty$/',$k))
078              {
079                  $this->_dirty = $this->_dirty || $v;
080              }
081          }
082      }
083      return $this->_dirty;
084  }
publicget_function_list ( )[ mysql ]
Parameters
No parameters for this method
Code
218  public function get_function_list()
219  {
220      $functions = array();
221      $q = "SHOW FUNCTION STATUS WHERE Db='{$this->database}'";
222      $this->query($q);
223      while ($this->next_record())
224      {
225          $functions[]=$this->record["Name"];
226      }
227     
228      $functions=array_unique($functions);
229      sort($functions);
230      return $functions;
231  }
publicget_json ( )[ obj ]
Parameters
No parameters for this method
Code
101  public function get_json()
102  {
103      $class = new ReflectionClass($this->classname);
104      $methods = $class->getMethods();
105      usort($methods,"sort_reflection_objects");
106      $accessors = array();
107      foreach ($methods as $index=>$method)
108      {
109          $declarer = $method->getDeclaringClass()->name;
110          if (preg_match('/^(get|set|)_(.+)$/',$method->name,$matches))
111          {
112              $accessor = $matches[2];
113              $getset = $matches[1];
114              eval("\$accessors[\$accessor] = \$this->".$accessor.";");
115          }
116      }
117      //return json_encode($this->get_array());
118      return json_encode($accessors);
119  }
publicget_prefix_list ( )[ mysql ]
Parameters
No parameters for this method
Code
133  public function get_prefix_list(){
134      $prefix = array();
135      $q = "SHOW TABLES;";
136      $this->query($q);
137      while ($this->next_record())
138      {
139          $tablename = $this->record[0];
140          $parts = explode("_",$tablename);
141          if(count($parts>0))
142          {
143              $prefix[]=$parts[0];
144          }
145      }
146     
147      $prefix=array_unique($prefix);
148      sort($prefix);
149      return $prefix;
150  }
publicget_properties ( )[ obj ]
Parameters
No parameters for this method
Code
121  public function get_properties()
122  {
123      return array_keys($this->array);
124  }
publicget_stored_procedure_list ( )[ mysql ]
Parameters
No parameters for this method
Code
203  public function get_stored_procedure_list()
204  {
205      $sprocs = array();
206      $q = "SHOW PROCEDURE STATUS WHERE Db='{$this->database}'";
207      $this->query($q);
208      while ($this->next_record())
209      {
210          $sprocs[]=$this->record["Name"];
211      }
212     
213      $sprocs=array_unique($sprocs);
214      sort($sprocs);
215      return $sprocs;
216  }
protectedget_string ( )[ obj ]
Parameters
No parameters for this method
Code
091  protected function get_string()
092  {
093      return method_exists($this,"__toString") ? $this->__toString() : null;
094  }
publicget_table_list ( search )[ mysql ]
Parameters
requiredsearch
Code
152  public function get_table_list($__search){
153      $tables = array();
154      $q = "SHOW FULL TABLES WHERE Table_type='BASE TABLE'";
155      if($__search)
156      {
157          $q.=" AND Tables_in_{$this->database} LIKE '{$__search}'";
158      }
159      $this->query($q);
160      while ($this->next_record())
161      {
162          $tablename = $this->record[0];
163          $tables[]=$tablename;
164      }
165     
166      $tables=array_unique($tables);
167      sort($tables);
168      return $tables;
169  }
publicget_trigger_list ( )[ mysql ]
Parameters
No parameters for this method
Code
233  public function get_trigger_list()
234  {
235      $triggers = array();
236      $q = "SHOW TRIGGERS FROM {$this->le}{$this->database}{$this->re}";
237      $this->query($q);
238      while ($this->next_record())
239      {
240          $triggers[]=$this->record["Trigger"];
241      }
242     
243      $triggers=array_unique($triggers);
244      sort($triggers);
245      return $triggers;
246  }
publicget_user_list ( )[ mysql ]
Parameters
No parameters for this method
Code
248  public function get_user_list()
249  {
250      $users = array();
251      $q = array();
252      $q[] = "USE mysql";
253      $q[] = "SELECT * FROM user";
254      $this->query($q);
255      while ($this->next_record())
256      {
257          $host = $this->record["Host"];
258          $user = strlen(trim($this->record["User"]))>0 ? $this->record["User"] : "Anonymous";
259          $users[]="{$user}@{$host}";
260      }
261     
262      $users=array_unique($users);
263      sort($users);
264      return $users;
265  }
publicget_view_list ( )[ mysql ]
Parameters
No parameters for this method
Code
188  public function get_view_list()
189  {
190      $views = array();
191      $q = "SHOW FULL TABLES WHERE Table_type='VIEW'";
192      $this->query($q);
193      while ($this->next_record())
194      {
195          $views[]=$this->record[0];
196      }
197     
198      $views=array_unique($views);
199      sort($views);
200      return $views;
201  }
publichalt ( msg )[ mysql ]
Parameters
requiredmsg
Code
381  function halt($msg)
382  {
383      $this->error = @mysql_error($this->lid);
384      $this->errno = @mysql_errno($this->lid);
385      $m = "MYSQL ERROR " . $this->errno . " : " . $this->error . " [ " . $msg . " ]";
386      trigger_error($m,E_USER_WARNING);
387  }
publicnext_record ( assoc [false] )[ mysql ]
Parameters
optionalassoc [false]
Code
110  public function next_record($__assoc=false)
111  {
112      if (!$this->qid)
113      {
114          $this->halt("next_record called with no query pending.");
115          return 0;
116      }
117      $this->record = @mysql_fetch_array($this->qid,($__assoc ? MYSQL_ASSOC : MYSQL_BOTH));
118      $this->errno  = mysql_errno();
119      $this->error  = mysql_error();
120      $this->row += 1;
121      $stat = is_array($this->record);
122      return $stat;
123  }
publicnum_rows ( )[ mysql ]
Parameters
No parameters for this method
Code
395  function num_rows()
396  {
397      if ($this->qid)
398      {
399          return @mysql_num_rows($this->qid);
400      }
401      else
402      {
403          return false;
404      }
405  }
publicparam_string ( value )[ mysql ]
Parameters
requiredvalue
Code
129  public function param_string($__value){
130      return $this->le . $__value . $this->re;
131  }
publicquery ( q )[ mysql ]
Parameters
requiredq
Code
065  public function query($__q){
066      global $num_queries;
067     
068      if($this->q && strlen($this->q->query)>0)
069      {
070          $__q=$this->q->query;
071      }
072      if (empty($__q))
073      {
074          return 0;
075      }
076      if (!$this->connect())
077      {
078          return false;
079      }
080      if ($this->qid)
081      {
082          @mysql_free_result($this->qid);
083          $this->qid = 0;
084      }
085 
086      $__queries = is_array($__q) ? $__q : array($__q);
087 
088      foreach ($__queries as $__q)
089      {
090          if (strlen(trim($__q)) > 0)
091          {
092              $this->qid = mysql_query($__q, $this->lid);
093          }
094      }
095 
096      $this->row = 0;
097 
098      $this->errno = mysql_errno();
099      $this->error = mysql_error();
100      if (!$this->qid)
101      {
102          $this->halt($__q);
103      }
104      $this->insert_id = mysql_insert_id($this->lid);
105 
106      $num_queries++;
107      return $this->qid;
108  }
public__set ( p , v )[ obj ]
Parameters
requiredp
requiredv
Code
030  public function __set($p,$v)
031  {
032      $methods = get_class_methods($this);
033      $properties = get_object_vars($this);
034      if (in_array("set_$p",$methods))
035      {
036          $this->{"set_$p"}($v);
037      }
038      else if (array_key_exists("_$p",$properties))
039      {
040          if (!preg_match('/_dirty$/',$p) && property_exists($this,"_{$p}_dirty"))
041          {
042              if (is_object($this->{"_$p"}))
043              {
044                  $this->{"_$p"}->dirty = true;
045              }
046              else
047              {
048                  $this->{"_{$p}_dirty"} = $this->{$p}==$v ? false : true;
049              }
050          }
051          $this->{"_$p"} = $v;
052      }
053      else if (in_array("set_" . substr($p,strpos($p,"_")+1), $methods))
054      {
055          $this->{"set_" . substr($p,strpos($p,"_")+1)}($v,substr($p,0,strpos($p,"_")));
056      }
057      else
058      {
059          trigger_error("This object [" . get_class($this) . ":$this->id] has no private property '_$p' for the requested public property '$p'",E_USER_WARNING);
060      }
061  }
publicset_q ( v )[ mysql ]
Parameters
requiredv
Code
419  public function set_q($__v)
420  {
421      if (is_string($__v))
422      {
423          $this->_q = new mysqlquery($__v);
424      }
425      else
426      {
427          $this->_q = $__v;
428      }
429  }
publictruncate_database ( enforce_constraints [true] )[ mysql ]
Parameters
optionalenforce_constraints [true]
Code
356  public function truncate_database($__enforce_constraints=true)
357  {
358      foreach($this->table_list as $tablename)
359      {
360          $this->truncate_table($tablename,$__enforce_constraints);
361      }
362      return true;
363  }
publictruncate_table ( tablename , enforce_constraints [true] )[ mysql ]
Parameters
requiredtablename
optionalenforce_constraints [true]
Code
334  public function truncate_table($__tablename,$__enforce_constraints=true)
335  {
336      if(!$__enforce_constraints)
337      {
338          $q = array();
339          $q[] = "SET SQL_MODE='';";
340          $q[] = "SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;";
341          $q[] = "SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO';";
342          $q[] = "TRUNCATE table $__tablename;";
343          $q[] = "SET SQL_MODE=@OLD_SQL_MODE;";
344          $q[] = "SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;";
345      }
346      else
347      {
348          $q = "TRUNCATE table $__tablename;";   
349      }
350     
351      $this->query($q);
352     
353      return true;
354  }
publicvalue_string ( value )[ mysql ]
Parameters
requiredvalue
Code
125  public function value_string($__value){
126      return is_null($__value) ? "null" : "'" . sql_real_escape_string($__value,$this->server_type) . "'";
127  }
 
Accessors
publicarray[ obj ]
Code
096  public function get_array()
097  {
098      return get_object_vars($this);
099  }
publicclassname[ obj ]
Code
086  public function get_classname()
087  {
088      return get_class($this);
089  }
publiccolumn_list[ mysql ]
Code
171  public function get_column_list($__tablename,$__search=null){
172      $columns = array();
173      $q = "SHOW COLUMNS in $__tablename";
174      if(!is_null($__search))
175      {
176          $q.=" WHERE Field LIKE '{$__search}'";
177      }
178      $this->query($q);
179      while ($this->next_record())
180      {
181          $columname = $this->record[0];
182          $columns[]=$columname;
183      }
184     
185      return $columns;
186  }
publicdatabase_list[ mysql ]
Code
267  public function get_database_list(){
268      $table = array();
269      $q = "SHOW DATABASES;";
270      $this->query($q);
271      while ($this->next_record())
272      {
273          $dbname = $this->record[0];
274          $table[]=$dbname;
275      }
276     
277      $table=array_unique($table);
278      sort($table);
279      return $table;
280  }
publicdirty[ obj ]
Code
063  public function get_dirty()
064  {
065      if ($this->id === 0)
066      {
067          $this->_dirty = true;
068      }
069      else
070      {
071          foreach (get_object_vars($this) as $k=>$v)
072          {
073              if ($this->_dirty)
074              {
075                  break;
076              }
077              if (preg_match('/_dirty$/',$k))
078              {
079                  $this->_dirty = $this->_dirty || $v;
080              }
081          }
082      }
083      return $this->_dirty;
084  }
publicfunction_list[ mysql ]
Code
218  public function get_function_list()
219  {
220      $functions = array();
221      $q = "SHOW FUNCTION STATUS WHERE Db='{$this->database}'";
222      $this->query($q);
223      while ($this->next_record())
224      {
225          $functions[]=$this->record["Name"];
226      }
227     
228      $functions=array_unique($functions);
229      sort($functions);
230      return $functions;
231  }
publicjson[ obj ]
Code
101  public function get_json()
102  {
103      $class = new ReflectionClass($this->classname);
104      $methods = $class->getMethods();
105      usort($methods,"sort_reflection_objects");
106      $accessors = array();
107      foreach ($methods as $index=>$method)
108      {
109          $declarer = $method->getDeclaringClass()->name;
110          if (preg_match('/^(get|set|)_(.+)$/',$method->name,$matches))
111          {
112              $accessor = $matches[2];
113              $getset = $matches[1];
114              eval("\$accessors[\$accessor] = \$this->".$accessor.";");
115          }
116      }
117      //return json_encode($this->get_array());
118      return json_encode($accessors);
119  }
publicprefix_list[ mysql ]
Code
133  public function get_prefix_list(){
134      $prefix = array();
135      $q = "SHOW TABLES;";
136      $this->query($q);
137      while ($this->next_record())
138      {
139          $tablename = $this->record[0];
140          $parts = explode("_",$tablename);
141          if(count($parts>0))
142          {
143              $prefix[]=$parts[0];
144          }
145      }
146     
147      $prefix=array_unique($prefix);
148      sort($prefix);
149      return $prefix;
150  }
publicproperties[ obj ]
Code
121  public function get_properties()
122  {
123      return array_keys($this->array);
124  }
publicq[ mysql ]
Code
419  public function set_q($__v)
420  {
421      if (is_string($__v))
422      {
423          $this->_q = new mysqlquery($__v);
424      }
425      else
426      {
427          $this->_q = $__v;
428      }
429  }
publicstored_procedure_list[ mysql ]
Code
203  public function get_stored_procedure_list()
204  {
205      $sprocs = array();
206      $q = "SHOW PROCEDURE STATUS WHERE Db='{$this->database}'";
207      $this->query($q);
208      while ($this->next_record())
209      {
210          $sprocs[]=$this->record["Name"];
211      }
212     
213      $sprocs=array_unique($sprocs);
214      sort($sprocs);
215      return $sprocs;
216  }
publicstring[ obj ]
Code
091  protected function get_string()
092  {
093      return method_exists($this,"__toString") ? $this->__toString() : null;
094  }
publictable_list[ mysql ]
Code
152  public function get_table_list($__search){
153      $tables = array();
154      $q = "SHOW FULL TABLES WHERE Table_type='BASE TABLE'";
155      if($__search)
156      {
157          $q.=" AND Tables_in_{$this->database} LIKE '{$__search}'";
158      }
159      $this->query($q);
160      while ($this->next_record())
161      {
162          $tablename = $this->record[0];
163          $tables[]=$tablename;
164      }
165     
166      $tables=array_unique($tables);
167      sort($tables);
168      return $tables;
169  }
publictrigger_list[ mysql ]
Code
233  public function get_trigger_list()
234  {
235      $triggers = array();
236      $q = "SHOW TRIGGERS FROM {$this->le}{$this->database}{$this->re}";
237      $this->query($q);
238      while ($this->next_record())
239      {
240          $triggers[]=$this->record["Trigger"];
241      }
242     
243      $triggers=array_unique($triggers);
244      sort($triggers);
245      return $triggers;
246  }
publicuser_list[ mysql ]
Code
248  public function get_user_list()
249  {
250      $users = array();
251      $q = array();
252      $q[] = "USE mysql";
253      $q[] = "SELECT * FROM user";
254      $this->query($q);
255      while ($this->next_record())
256      {
257          $host = $this->record["Host"];
258          $user = strlen(trim($this->record["User"]))>0 ? $this->record["User"] : "Anonymous";
259          $users[]="{$user}@{$host}";
260      }
261     
262      $users=array_unique($users);
263      sort($users);
264      return $users;
265  }
publicview_list[ mysql ]
Code
188  public function get_view_list()
189  {
190      $views = array();
191      $q = "SHOW FULL TABLES WHERE Table_type='VIEW'";
192      $this->query($q);
193      while ($this->next_record())
194      {
195          $views[]=$this->record[0];
196      }
197     
198      $views=array_unique($views);
199      sort($views);
200      return $views;
201  }
Get Helix PHP Framework at SourceForge.net. Fast, secure and Free Open Source software downloads