XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
ClickCountExpression.class.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) NAVER <http://www.navercorp.com> */
3 
11 {
12 
18 
26  function __construct($column_name, $alias = NULL, $click_count = false)
27  {
28  parent::__construct($column_name, $alias);
29 
30  if(!is_bool($click_count))
31  {
32  // error_log("Click_count value for $column_name was not boolean", 0);
33  $this->click_count = false;
34  }
35  $this->click_count = $click_count;
36  }
37 
38  function show()
39  {
40  return $this->click_count;
41  }
42 
47  function getExpression()
48  {
49  $db_type = Context::getDBType();
50  if($db_type == 'cubrid')
51  {
52  return "INCR($this->column_name)";
53  }
54  else
55  {
56  return "$this->column_name";
57  }
58  }
59 
60 }
61 /* End of file ClickCountExpression.class.php */
62 /* Location: ./classes/db/queryparts/expression/ClickCountExpression.class.php */
__construct($column_name, $alias=NULL, $click_count=false)