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 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; } Link to comment https://forums.phpfreaks.com/topic/138088-method-chaining-question/#findComment-721827 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.