Category Covered

CakePHP Naming Conventions  

If you want good support from cakephp library you must follow the cakephp naming convention.

Database, table & field name convention:

1. Create your database.
2. Table name convention - lowercase, plural, multi-word tables to be separated by underscore.
    Example:  users or doctor_patients etc
2. Each table must have one PRIMARY KEY to be named as 'id' (NOT NULL Auto Inc
By: Tech writer  |   Total Read: 865  |   Read more..

CakePHP tutorial  

Here i am going to write a step by step beginners cakephp tutorial This tutorial is based on cake version 2.x CakePHP Directory Structure /app //This is the folder where you only work no where else /Config /Schema db_acl.php db_acl.sql i18n.php i18n.sql sessions.php sessions.sql acl.ini.php acl.php bootstrap.php //Always e
By: Tech writer  |   Total Read: 1088  |   Read more..

How to set limit on cakephp find  

If you want to set cakephp limit on your cakephp find query follow the example   $results = $this->User->find('all', array( 'conditions' => array('OR'=> array('User.first_name LIKE' => '%' . $query . '%'), 'fields' => array('', 'User.first_name'), "limit" => 20 )); K5F3YMRV6YNH
By: Tech writer  |   Total Read: 1501  |   Read more..

Read two xml file using javascript  

I have two xml file products.xml and categories.xml file. So i am going two make a tree that will show category and its related products.   $(document).ready(function(){ $.get('xml/categories.xml',function(data){ var _html="<ul>"; $(data).find('Categories').each(function(key,value){ _html+="<li>"+$(this).find('CategoryName').text(); catId = $(this).find("CategoryID").
By: Tech writer  |   Total Read: 2119  |   Read more..

How to write or condition on cakephp query  

If you want to add a OR condition on cakephp condtions you can follow this statement.  Here is the complete query example   'Company' => array ( 'conditions' => array ( 'OR' => array( 'Company.status' => 0, 'Company.status' => $status, ) ) )  Here is complex query example on cakephp or condition $results = $this->User->find('list', array(
By: Tech writer  |   Total Read: 1044  |   Read more..

Cakephp form saving problem  

Sometimes we see that everything is fine and no error are showing when we are going to save a cakephp form but cakephp form is not saving on that cases you can test is there any validation error is there or not by using on following code after the save action.    debug($this->Customer->validationErrors);
By: Tech writer  |   Total Read: 625  |   Read more..

Javascript function not working without alert  

I have a javascript function but without alert why its not working? I am confused. I used the delay/ sleep function but still now no success.   $(document).ready(function(){ $.get('xml/categories.xml',function(data){ var _html="<ul>"; $(data).find('Categories').each(function(key,value){ _html+="<li><a href='#'>"+$(this).find('CategoryName').text()+"</a>";
By: Tech writer  |   Total Read: 2374  |   Read more..

Sub domain in localhost server  

If you want to setup Sub domain in localhost server then this article will help you. Step 1: Edit the file located in C:\windows\system32\drivers\etc\hosts *Before edit the file make sure you take back up of the file. add the following line to it subsite.localhost Save the File Step 2: Edit the httpd.conf file on apache server You need to create virtualhost on localhost Add the following to the bottom of the file NameVirtualHo
By: Tech writer  |   Total Read: 627  |   Read more..

CakePHP CSS Image not loading  

If you see that when you are going to deploy a cakephp project that css and image are not loading on your application then you have to think about few things. Here are issue that you need to take care 1. Make sure that your server Apache mod_rewrite is enabled. If you are using third party webhosting then just tell them to enable "mod_rewrite" 2. The .htaccess parallel to your app folder make sure that you the following contents Pat
By: Tech writer  |   Total Read: 2697  |   Read more..

Call to undefined function simplexml_load_file  

Are you getting the error "Call to undefined function: simplexml_load_file() ?" What version of php are you running? Must have version php 5.
In PHP 5 its default enable
By: Tech writer  |   Total Read: 1260  |   Read more..
Top 15 Posts