Find

Navigation:  Development > Function Reference > InformationSet >

Find

Previous pageReturn to chapter overviewNext page

This function fetch a singe row from a table. See below format
 

App::InformationSet(NAME)->find(CONDITION);

 
If we use just find() then it return a singe entry of table following default insert sequence. Also we can pass condition of WHERE clause as parameter of the function.

 

For example: 
$data = App::InformationSet('blogpost')->find(); 
$data = App::InformationSet('blogpost')->find("1 ORDER BY id ASC");
 
// Return value
/*
Array

(

    [id] => 1

    [adminref] => 1

    [entrydate] => 2012-12-12 22:23:41

    [lastmodified] => 2012-12-14 00:13:02

    [title] => How to install Application

    [category] => 2

    [description] => Application is one of the easiest solutions to incorporate new features. 

    [status] => Public

)*/