title: Only variables should be passed by reference, database/DB_active_rec.php
body: <p>I am new to codeigniter, I just want to ask how to get rid with this thing </p>
  
  <pre><code>     A PHP Error was encountered
  
       Severity: Notice
       Message: Only variables should be passed by reference
       Filename: database/DB_active_rec.php
       Line Number: 225
  </code></pre>
  
  <p>I dont know why, this suddenly comes out, but my page is doing fine, but this is at the top of my page, how to get rid of this thing, this is what i have:</p>
  
  <pre><code>Pages_Controller:
  public function clients_ordered_products($id){
      if(isset($_SESSION["id"])){
          if($_SESSION["Usertype"]==1){
              $this-&gt;load-&gt;view('admin/header');
              $this-&gt;load-&gt;view('title/title_admin');
              $this-&gt;load-&gt;view('admin/navigation');
              $this-&gt;data["posts"] = $this-&gt;Generate_Model-&gt;getProductsClientsOrdered($id);
              $this-&gt;load-&gt;view('admin/clients_ordered_products',$this-&gt;data);
              $this-&gt;load-&gt;view('admin/footer');
          }
          else if($_SESSION["Usertype"]==0){
              redirect('Pages_Controller/Ooops_Client');
          }
      } 
      else{
          redirect($url);
      }           
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>Generate_Model:
  public function getProductsClientsOrdered($id){
      $this-&gt;db-&gt;select('*');
      $this-&gt;db-&gt;select_sum('tbl_product_selected.Quantity');
      $this-&gt;db-&gt;from('tbl_product_selected');
      $this-&gt;db-&gt;join('tbl_product','tbl_product.Product_ID = tbl_product_selected.Product_ID');
      $this-&gt;db-&gt;where('Account_ID',$id);
      $this-&gt;db-&gt;where('Purchase_time',NULL);
      $this-&gt;db-&gt;where('Active',1);
      $this-&gt;db-&gt;group_by('tbl_product_selected.Product_ID');
      $query = $this-&gt;db-&gt;get();
      return $query-&gt;result();
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>  &lt;div id="page-wrapper"&gt;
    &lt;div class="cart"&gt;
    &lt;div class="container"&gt;
           &lt;div class="col-md-9 cart-items"&gt;
                      &lt;!-- /.panel-heading --&gt;
                      &lt;div class="panel-body"&gt;
  &lt;table id="cart" class="table table-hover table-responsive"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Product Name&lt;/th&gt;
              &lt;th&gt;Price&lt;/th&gt;
              &lt;th&gt;Quantity&lt;/th&gt;
              &lt;th class="text-center"&gt;Subtotal&lt;/th&gt;
              &lt;th&gt;Action&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;?php $total = 0; ?&gt;
      &lt;?php foreach($posts as $post){ ?&gt;
              &lt;form action="&lt;?php echo base_url(); ?&gt;index.php/Transaction_Controller/removeItem/&lt;?php echo $post-&gt;Product_selected_id; ?&gt;" method="post"&gt;
                  &lt;tbody&gt;
                      &lt;tr&gt;
                         &lt;td data-th="Product"&gt;
                              &lt;div class="row"&gt;
                                  &lt;div class="col-sm-2 hidden-xs"&gt; &lt;img style="height:100px;"src="&lt;?php echo $post-&gt;Directory?&gt;"&gt;&lt;/div&gt;
                                  &lt;div class="col-sm-10"&gt;
                                      &lt;h4 class="nomargin"&gt;&lt;/h4&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/td&gt;
                          &lt;td data-th="Price"&gt;&lt;?php echo $post-&gt;Price;?&gt;&lt;/td&gt;
                          &lt;td data-th="Price" style="text-align:left"&gt;&lt;input type="number" value="&lt;?php echo $post-&gt;Quantity; ?&gt;" class="form-control" style="width:60px"/&gt;&lt;/td&gt;
                          &lt;td data-th="Price" style="text-align:center"&gt;&lt;?php echo $subtotal = $post-&gt;Price * $post-&gt;Quantity; ?&gt;&lt;/td&gt;    
                          &lt;td class="actions" data-th=""&gt;
                              &lt;a href="#" class="btn btn-primary btn-sm"&gt;UPDATE&lt;/a&gt; 
                              &lt;button class="btn btn-danger btn-sm"&gt;DELETE&lt;i class="fa fa-trash-o"&gt;&lt;/i&gt;&lt;/button&gt;                               
                              &lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;?php $total += $subtotal; ?&gt;
                  &lt;/tbody&gt;
                  &lt;tfoot&gt;
                      &lt;tr class="visible-xs"&gt;
                          &lt;td class="text-center"&gt;&lt;strong&gt;
  
  
                          &lt;/strong&gt;&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;td&gt;&lt;/td&gt;
                          &lt;td colspan="2" class="hidden-xs"&gt;&lt;/td&gt;
                          &lt;td&gt;&lt;/td&gt;
                          &lt;td&gt;&lt;/td&gt;
                      &lt;/tr&gt;
                  &lt;/tfoot&gt;
              &lt;/form&gt;
                  &lt;?php } ?&gt;
              &lt;/table&gt;
                 &lt;center&gt;&lt;form action="&lt;?php echo base_url(); ?&gt;index.php/Transaction_Controller/Products_Ordered/" method="post"&gt;
                      &lt;input type="hidden" value="&lt;?=$total?&gt;" name="total"/&gt;
                      &lt;input type="hidden" value="&lt;?php echo $post-&gt;Account_ID; ?&gt;" name="id"/&gt;
                      &lt;button type="submit" class="btn btn-success btn-block"&gt;PAY NOW! &lt;i class="fa fa-angle-right"&gt;&lt;/i&gt;&lt;/button&gt;
                  &lt;/form&gt;&lt;br/&gt;&lt;br/&gt;
       &lt;/div&gt;
       &lt;/div&gt;
       &lt;/div&gt;
       &lt;/div&gt;
  </code></pre>
  
  <p>why is this happening?</p>