TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 08-01-2009, 05:19 PM   #1 (permalink)
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default 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.
__________________
Tanax is offline  
Reply With Quote
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 08:11 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design