findByField

Navigation:  Development > Function Reference > CategorySet >

findByField

Previous pageReturn to chapter overviewNext page

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

App::CategorySet(NAME)->findBy[Field](VALUE);
 

 
We can pass condition of WHERE clause as parameter of the function.

 

For example: 
$data = App::CategorySet('blog-cat')->findById(1);
 
// 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

)*/