Example #1
0
 /**
  * Builds all where statements
  */
 private function _buildWhere()
 {
     if (!empty($this->_where)) {
         $wheres = $this->_where;
         $wheres[0]['connector'] = '';
         $this->_query_string .= 'WHERE ';
         foreach ($wheres as $where) {
             if (is_null($where['value'])) {
                 $this->_query_string .= $where['connector'] . " " . $where['string'] . " ";
             } else {
                 $this->_query_string .= $where['connector'] . " " . $where['string'] . " ";
                 $this->_bind_params[0] .= \Nightshade\Core::libHelper('Database')->determineType($where['value']);
                 $this->_bind_params[] = $this->_db->escape($where['value']);
             }
         }
     }
 }