views:

38

answers:

1

My function breaks at the line where I make an Active Record call, so I must not be calling things right.

<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

Class Stuff {
    public function specific($passedArray) {

         echo "Test";

            $CI =& get_instance();
            $CI->load->database();
            $CI->load->helper('array');
            $CI->load->helper('format_helper');

            $dataArray = $this->db->where($column_name, $StockNum);
            $dataArray = $this->db->get($tablename);

            echo "Bollocks!";

"Test" will echo, but not Bollocks!

A: 

You should be using $CI->db->... not $this->db

Ken Struys