[Solar-talk] How to use Models?

Tino Ehrich ehrich at efides.com
Mon Mar 24 19:23:42 CDT 2008


Indeed, it helps :)

Thanks!

Cheers
Tino


Kilbride, James P. wrote:
> 
> Instantiation a copy of the model:
> 
> $myModel = Solar::Factory("Vendor_Models_MyModel");
> 
> This gives you a copy of the model. From here you can do your fetches
> and such:
> 
> $myResults = $myModel->fetchAllById(15);//Fetchs all records with column
> Id = 15
> 
> $myUniqueResult = $myModel->fetchOneByBob('Never!'); // Fetchs one
> record where column bob = 'Never!'
> 
> $myModel->insert(array('my columns' => 'values for each
> column'));//insert a record
> 
> Does that help?
> 
> James Kilbride
> 
> -----Original Message-----
> From: solar-talk-bounces at lists.solarphp.com
> [mailto:solar-talk-bounces at lists.solarphp.com] On Behalf Of Tino Ehrich
> Sent: Monday, March 24, 2008 3:53 PM
> To: solar-talk at lists.solarphp.com
> Subject: [Solar-talk] How to use Models?
> 
> 
> I set up a model class to my database table 'members'.
> This process is actually well explained through the wiki page.
> 
> But how do I access my model in the controller/view?
> Any information about this approach?
> 
> Thanks again!
> Cheers
> Tino
> --
> View this message in context:
> http://www.nabble.com/How-to-use-Models--tp16259508p16259508.html
> Sent from the SolarPHP Talk mailing list archive at Nabble.com.
> 
> _______________________________________________
> Solar-talk mailing list
> Solar-talk at lists.solarphp.com
> http://mailman-mail3.webfaction.com/listinfo/solar-talk
> 
> _______________________________________________
> Solar-talk mailing list
> Solar-talk at lists.solarphp.com
> http://mailman-mail3.webfaction.com/listinfo/solar-talk
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-use-Models--tp16259508p16265725.html
Sent from the SolarPHP Talk mailing list archive at Nabble.com.



More information about the Solar-talk mailing list