EllisLab text mark
Advanced Search
     
DB select ‘feature’/‘bug’
Posted: 06 November 2012 09:22 AM   [ Ignore ]
Joined: 2012-09-07
6 posts

$this->db->select(
  ‘this,
    that,
  —theother,
    something
)->get(‘table’);
reformats my select statment triming all the lines into a single line for the select part which makes ‘—the other, something’ commented out. I only wanted theother commented out.

offending code in system/database/DB_active_rec.php:

/**
    * Select
    *
    * Generates the SELECT portion of the query
    *
    * @access   public
    * @param   string
    * @return   object
    */
  function select($select = ‘*’)
  {
      if (is_string($select))
      {
        $select = explode(’,’, $select);
      }
 
      foreach ($select as $val)
      {
        $val = trim($val);
     
        if ($val != ‘’)
          $this->ar_select[] = $val;
      }
      return $this;
  }
what’s the premise of doing it this way?

http://www.galatourist.com
http://www.whitedolphinhalong.com
http://www.hotelinlasvegas-us.com