How query generates in controller,, without any function call to loaded Model ? |
Hello, Hi to all
i am some novice , i have FusionInvoice from Github, i am unable to understand, how its controller is getting query result from model, where the function not exist in model. in its Quotes/Create Quote Modal, Client Name filed has .TypeAhed plugin, Client Name : $.post("<?php echo site_url('clients/ajax/name_query'); ?>" The Clients/Ajax Controller has function PHP Code: public function name_query() But the mdl_clients has no "select" function defined,, but yes , there is a function called "default_select", but its totally different than the one passed as in above controller to $clients. the default_select in mdl_cleints is as following PHP Code: public function default_select() Can any one help please how controller is getting query data ? As in controller,, only field name is given in query, without table name,, so how its doing then ? Any help will be appericiated Thanks
Is the model mdl_clients a child class of some other model and not CI_Model? Is it, for example, defined something like this?
PHP Code: class Mdl_clients extends Some_other_model { If true, then the select method is probably in Some_other_model
Yes, you are right,
mdl_client is child of My_Model i hv attached the my_model file i think it using __call, get and set_defaults functions. |
Welcome Guest, Not a member yet? Register Sign In |