I got stucked in a problem. hope anyone will help it out. i m using codeigniter to build my application. Now i have made an idea to create a single model for whole application. But how is it possible??my senior also asked me this, and told me itz not possible. but i m very close to success. only thing lacking is passing data from controller to model's constructor.
Actually my idea behind it is : -> i will send all data to model's constructor(if possible)
->then validating data(using my own validating class)
->setting class properties dynamically(using standard class)
->executing query(query type will reside in data array passed through controller).
suppose array[0]
stores 'insert'
so i will execute query using : $this->array[0]->.. etc
but my 1step is big problem to me..as i cant say that further things will work or not.