Sep
6

Virtual fields in cakephp are used as an alias in sql expressions. Alias is used to give a column a different name.

Example, to concatenate fields,

class Applicant extends AppModel {
    var $name = 'Applicant';
    var $virtualFields = array( 'name' => "CONCAT(Applicant.firstname, ' ', Applicant.lastname)" );
}

To access the virtual field

$this->Applicant->find( 'first', array( 'fields' => array( 'name' ) ) );
Jun
1

Using Fx.slide in Cakephp is very easy. In this tutorial, I assume you know how the MVC works and how to create one.

First, include the javascript in the head section of the default.ctp file. There are only two javascript files. They are the mootools.js( core ) and slider.js. Put these files inside /app/webroot/js.

Continue Reading →

© 2012 · Karl Sheen Blog · Sitemap · Proudly powered by Wordpress and Twitter Bootstrap · Icons by Glyphicons