p_t Posted December 23, 2008 Share Posted December 23, 2008 Hi all, I am currently working on a class which will be use for mysql query. $inst = new Class(); $inst->select('*')->fields(array('one','two','three','four'))->where('name=hello')->where('date=20-02-1928')->where('test=1')->order('date')->order('time'); How can i go on about storing all the values in method 'where()' into an array?? Thanks , Pez Quote Link to comment https://forums.phpfreaks.com/topic/138088-method-chaining-question/ Share on other sites More sharing options...
MadTechie Posted December 23, 2008 Share Posted December 23, 2008 Like this private where = array(); public function where($mywhere) { $this->where[] = $mywhere; } Quote Link to comment https://forums.phpfreaks.com/topic/138088-method-chaining-question/#findComment-721827 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.