08-01-2009, 05:19 PM
|
#1 (permalink)
|
|
The Prestige
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
|
Getting irritated
So, I'm really getting irritated by this error. It worked GREAT before when I used it in my MVC framework, but when I extracted the DB class from the framework(edited some path's and stuff), it just won't work.
PHP Code:
public function __call($function, $params) { var_dump($params); $args = split(', ', $params[0]); return call_user_func_array(array($this->DB_Helper, $function), $args); }
Gives me this:
Code:
array(1) { [0]=> string(7) "user_id" } array(0) { }
Notice: Undefined offset: 0 in D:\Wamp\www\Lemons_Ny\includes\classes\MySQL_Driver.php on line 244
244 => $args = split(', ', $params[0]);
I'm calling it like this:
PHP Code:
$data['sql'] = $user->user_check('testname', 'pass');
and user_check where I'm using the __call method:
PHP Code:
public function user_check($user_name, $user_pass) { $this->db->select('user_id')->table('users')->where('user_name', $user_name)->where('user_pass', $user_pass); $query = $this->db->get(); return $query; }
Any ideas?? Tell me if you need more codesnippets.
__________________
|
|
|
|