How to find the value of a single field in cakePHP

No Comments

Use the model method field if no matching data is found it returns false.

Example

 
	$this->Model->id = 10;
 
	$this->Model->field('name');

The example above displays the value of the name field in the database where the idis equal to 10

Read more here

Image Credits: Photo by Isis França on Unsplash.

Last Updated On March 22, 2018

Related Articles

No results found

Leave a Reply

avatar
  Subscribe  
Notify of
Menu
Copy link