Thursday, December 29, 2011
Wednesday, December 28, 2011
Tuesday, December 27, 2011
Tuesday, December 6, 2011
import csv
controller
function import($merchant_id){
if(!empty($this->data['Product']['excel']['tmp_name'])){
$row = 1;
if (($handle = fopen($this->data['Product']['excel']['tmp_name'], "r")) !== FALSE) {
while (($data = fgetcsv($handle, 1000, "^")) !== FALSE && $row<30) {
//process and save data
$product['Product']['name']=$data[0];
$product['Product']['description']=$data[2];
$product['Product']['merchant_id']=$merchant_id;
$product['Product']['price']=$data[3];
$product['Product']['weight']=$data[4];
$product['Product']['status']=1;
$this->Product->create();
$this->Product->save($product,false);
}
$row++;
}
fclose($handle);
}
}
Friday, December 2, 2011
Chinese input in Ubuntu
In terminal:
$ sudo apt-get install scim-qtimm im-switch scim-pinyin
$ im-switch -z en_US -s scim
You must restart your X window (log out, then log in) to take effect.
You can press "Ctrl+blank" to switch between English and Chinese input mode now in all applications.
Refer: https://help.ubuntu.com/community/SCIM/Chinese
Bank Promotion
AmBank :
Go to the Bank Promotion Page
Go to the Bank Promotion Page
BSN
Go to the Bank Promotion Page
CIMB
Go to the Bank Promotion Page
Citibank
Go to the Bank Promotion Page
Hongleong
Go to the Bank Promotion Page
HSBC
Go to the Bank Promotion Page
Maybank
Go to the Bank Promotion Page
Public Bank
Go to the Bank Promotion Page
RHB
Go to the Bank Promotion Page
Standard Chartered
Go to the Bank Promotion Page
UOB
Go to the Bank Promotion Page
Thursday, December 1, 2011
ColorNote
A good app for checklist and note
The main reason I choose it:
- simple and easy
- the checklist is really checklist, it will strike through the item but not delete or hide it
- can sort the checklist easily
- fun to see the colorful widget on my screen
Further detail:https://market.android.com/details?id=com.socialnmobile.dictapps.notepad.color.note&feature=related_apps
The main reason I choose it:
- simple and easy
- the checklist is really checklist, it will strike through the item but not delete or hide it
- can sort the checklist easily
- fun to see the colorful widget on my screen
Further detail:https://market.android.com/details?id=com.socialnmobile.dictapps.notepad.color.note&feature=related_apps
Cash Droid
Agood app for money management
REAL recurring transactions. Something that not only simply recalls the payments, but also allows you to plan incomes and expenses, and forecast your financial situation. The program also includes these transactions in reports and budgets.
ADVANCED, interactive reports. It is possible to analyze any data, broken down into categories, projects, payees, currency, etc. Each item of the report can be further analyzed drill down it on the other ingredients, make a monthly analysis, or simply view the transactions made up for it.
SAFE data backup. Automatically created as often as you want. The program will take care about the safety of your data. Additionally, data can be password protected.
FULL support for multiple currencies. The program always show you the sum value of your assets, taking into account the most recent exchange rate. The reports always show the real value in your default currency, regardless of transaction currency. Information broken down by currency is an option, not a limitation.
Other examples of functions:
- mechanism of budgets,
- split transactions included in all program function,
- suggests a categories based on previously transactions (based on the payee or memo),
- account balance allows to predict your financial situation,
- securing access to the program with to unlock pattern,
- mechanism to reconcile accounts,
- import / export in QIF format,
- and many, many others.
The main reason i choose it:
- support multi account and the "transfer" transaction type is available
- security
- categorization of transaction
- variety of reports
Tips:
- configure the preference for security(unlock pattern) and convenience (such as default currency)
- to update or delete item(account or transaction), touch the item for a while, and a action list will be prompt.
- delete all data by go Database->Erase data
Further details:
https://market.android.com/details?id=com.financial.cashdroid.ads
REAL recurring transactions. Something that not only simply recalls the payments, but also allows you to plan incomes and expenses, and forecast your financial situation. The program also includes these transactions in reports and budgets.
ADVANCED, interactive reports. It is possible to analyze any data, broken down into categories, projects, payees, currency, etc. Each item of the report can be further analyzed drill down it on the other ingredients, make a monthly analysis, or simply view the transactions made up for it.
SAFE data backup. Automatically created as often as you want. The program will take care about the safety of your data. Additionally, data can be password protected.
FULL support for multiple currencies. The program always show you the sum value of your assets, taking into account the most recent exchange rate. The reports always show the real value in your default currency, regardless of transaction currency. Information broken down by currency is an option, not a limitation.
Other examples of functions:
- mechanism of budgets,
- split transactions included in all program function,
- suggests a categories based on previously transactions (based on the payee or memo),
- account balance allows to predict your financial situation,
- securing access to the program with to unlock pattern,
- mechanism to reconcile accounts,
- import / export in QIF format,
- and many, many others.
The main reason i choose it:
- support multi account and the "transfer" transaction type is available
- security
- categorization of transaction
- variety of reports
Tips:
- configure the preference for security(unlock pattern) and convenience (such as default currency)
- to update or delete item(account or transaction), touch the item for a while, and a action list will be prompt.
- delete all data by go Database->Erase data
Further details:
https://market.android.com/details?id=com.financial.cashdroid.ads
Wednesday, November 30, 2011
Salt water fish shop in Klang Valley
Mon: 10:00 am - 7:00 pm
Wed - Sun: 10:00 am - 7:00 pm
Wed - Sun: 10:00 am - 7:00 pm
- Many special species such as nudibranchs, sharks, etc.
- Price is cheaper
- New arrival updated on FBOceanic Aquarium
NO 17& 19 Jalan 23 Taman Bukit Kuchai Batu 8 Jalan puchong, 47190 Selangor, Malaysia
Tel: 03-8070 2273
Mon: 10:00 am - 8:00 pm
Wed - Sat: 10:00 am - 8:00 pm
Sun: 10:00 am - 6:00 pm
* Friday night - pasar malam outside, hard to find parking
- Focus on aquarium, so much choice
- The fishes more stable (won't have serious problem,eg sick).
- Small part(flag) of mushroom and button available (instead of a big rock)
88petsmart
Pandan Indah
8, 10 & 12, Jalan Pandan Indah 4/10, Pandan Indah, 55100, Kuala Lumpur, Malaysia. Tel: 603-42959160, 42959180 Fax: 603-42959158 Mon– Sat: 11:30am – 9pm Sun: 11:30am – 8pm SunwayMas 20 & 22, Jalan PJU 1/3D, SunwayMas Commercial Centre, 47301, P.J. Selangor. Tel: 603 - 7805 4478 / 79 Mon – Sat: 10:30am – 8pm Sun: 10:30am – 7pm
- Visited SunwayMas branches, no much choices too since not focus on saltwater life, but the fishes quite stable, and the price is cheaper
5-1, Jalan PJU 1/3F Sunway Mas Commercial Center,47301, Petaling Jaya. Tel: 03-7886 7012
Mon – Sat: 11:00am – 8:30pm
Sun: 10:00am – 6:30pm
- The prices are listed besides the fish tank. Price is reasonable.
Tue - Sun: 1130 pm to 830 pm Mon - CLOSED - Much choices. - The price will be very nice if you are regular customer... (unfortunately i'm not).
Ikano Power Center
S1, IPC Shopping Centre (Level 2), No:2, Jln PJU 7-2, Mutiara Damansara, 47800 Petaling Jaya, Selangor, Malaysia.
Greate Eastern Mall
Lot No.2, Lower Ground Floor, Great Eastern Mall, No.303, Jln Ampang, 50450 KL
Tel: 03-42577571 Mid Valley
Lot No 7-015-A, 3RD Floor, Mid Valley Magamall City, Lingkaran Syed Putra, 59200 KL
Tel: 03 22829790 - Visited all but bought fish in ikano only. - Need more care for purchased fish, especially the fish which stayed in their coral area. |
Kedai Akuarium Good View Centre
12, Jalan Utama 1/1,Kawasan Perindustrian Puchong Uama, 47140 Kuala Lumpur, Malaysia
- Visited once on Jan 2014.
- The coral and anemone not displayed under light??
Waterlife Station
104,Jalan Selar, Taman Bukit Ria, Cheras. 56100. Kuala Lumpur.
Hp: 03-9283 7578, 03-9286 7578
Mon - Sat : 11:30am - 8:30pm
Sunday : 11:30am - 6:00pm
- Visited once on Dec 2013.
- Salt and supplements are cheaper.
- Very good services
OceanTreasure
Lot 10,1st floor, Petronas Jalan Kolam Ayer Lama, 68000, Ampang.
Hp: 012-6634445 (Ariff) & 017-3543269 (Fairuz)
Sat-Thu: 1.00pm - 9.30pm
- Visited once on Dec 2013.
- Focus on coral
Nes Aquatic
D2-12A-G,Jalan Dutamas 2,Taman Dutamas,43200 Balakong, Selangor
Hp: 0197799918
Tue - Sun: 11:00am - 20:00pm
- Visited once on Dec 2013.
- Supplements are cheap
- Update on FB. Fast selling (almost empty 1 week after arrival)
Sew Chin Aquarium
No.21C, Jalan Pasar Baru,Ground Floor, Tongkhin,55100 Pudu,Kuala Lumpur
Hp:012-2638476(阿全)
- Visited once on Nov 2013. Never go after that due to location
- No much choices, but the fishes seem like very stable (I didn't purchase, so not sure)
Sixty Two Marine Aquarium
No.8, Jalan Bunga Tanjung 9B, Taman Muda, 68000 Ampang.
Tel/Fax : 03-42953390,H/P : 016-2042133
- seem like more focus on tanks and fresh water aquarium.
- Last visited on Dec 2013. No salt water fish at all.
Malaya Reef
Lot 10, Garden Mart, Jalan Persiaran Tropicana, Tropicana Selatan, 47301 Petaling Jaya, Malaysia
- got great display tank (rare item e.g. very colorful mini carpet inside).
- Last visited on Jan 2014.
The fish Shop I haven't go:
Aquatropics Aquarium Enterprise
No 36-G,Jalan Sg.Burung Y32/Y, Bukit Rimau, Seksyen 32,Shah Alam, 40460, Selangor.
Hp :012-281 7188(Eric) Fax:03-5131 5851
M&M Pet Shop
No. 13, Jalan Midah 12,Taman Midah, Cheras 56000, K.L
Tel: 03-9130 1411
Closed on Sunday
Ocean Rich Worldwide Sdn Bhd / MyCoralFish.com
Lot 46055, Jalan Besar, Kampung Sungai Tua, Batu 9, Off Jalan Ulu Yam, 68100 Batu Caves, Selangor
Tel : 6014-6061358, 016-2183818 (King)
Betta Nature
1-1B, Jalan Raja Uda, Kampung Baru 50300 Kuala Lumpur, Malaysia
Mon – Sun: 6:00pm – 3:00am
Tel : 018 244 2412 or 018 285 7579
Fish World Aquarium
No.43,Jalan 7/40,Taman Pusat Kepong 52100 Kuala Lumpur
Mon - Sat 10:30am - 8:30pm
Sun - 10:30am - 5:00pm
Tel : 03-62500212
Bone Terra Aquaria
No. 9144-B, Jalan Pulau Pinang, Taman Melawati
53100 Ulu Klang
Mon - Sat: 10:00 am - 6:00 pm
Tel : 03-62500212
The fish Shop suspected Closed/Moved:
GV Marine Aquatics Centre
No.19-21, Jalan Utama 1/6 , Taman Perindustrian Puchong Utama, Seksyen 1, Puchong Perdana 47100 Selangor.
Tel/Fax: (603) 8063 3739 HP: 012 2608198
- Visited once on 2010. Never go after that due to location
- Much choices.
Ocean World Aquatic
50 Jln Kuchai Maju 6, 58200 Kuala Lumpur, Malaysia
- Visited once on 2012. Never go after that because felt that I was invisible there.
Nilufar Pet Aquatic
No 2-01-02, 289, The Scott Garden, Jalan Klang Lama, 58100 Kuala Lumpur, Malaysia
Tel: 03-7984 6268
Mon - Thu: 11:30am – 9:30 pm
Fri - Sun: 11:30am – 10:30pm
- Got promotion for some items
- No much choice for marine life (wonder why they always keep all the fishes in the display tank and let the selling space empty)
AQUATICS INTERNATIONAL SDN. BHD.
260A Jalan Satu A, Kampong Baru Subang, 40150 Shah Alam, Selangor, Malaysia
Tel: 60-3-7846 3559, +60-3-78461978 Fax: 60-3-78463864
- Last visited on March 2014.
- Much choices.
- Best place if you need a lot of snail.
- Price is cheaper after bargain.
update on 12 March 2014
Monday, November 21, 2011
Javascript: String function - camelize, underscore
To camel case
To Underscore from Camel Case
function camelise(str){
var camelize=str.replace (/(?:^|[-_])(\w)/g, function (_, c) {
return c ? c.toUpperCase () : '';
})
return camelize;
}
To Underscore from Camel Case
function underscore(str){
var txt=str.replace(/([A-Z])/g, function($1){return "_"+$1.toLowerCase();});
txt=txt.substr(1);
return txt;
}
Thursday, November 17, 2011
Cash Back Credit Card In Malaysia
Assume:
Monthly Expense:
Petrol: RM
Dining: RM
Telecommunication: RM
Pharmaceutical: RM
Groceries: RM
Cinema: RM
Others: RM
Total: RM0
Affin Bank
Cash back=0
Alliance Bank
Highest Cash Back=
Citibank Cash Back Platinum Card
Cash back=0
OCBC TITANIUM
Cash back=0
UOB ONE CARD
Cash back=0
Addition to UOB
SMART$ CASH PROGRAMME :
Conclusion:
Apply two card, UOB and OCBC
Use UOB One card for petrol, cinema, pharmaceutical and any smart cash merchant's transaction.
Use OCBC TITANIUM for other transactions
Monthly Expense:
Petrol: RM
Dining: RM
Telecommunication: RM
Pharmaceutical: RM
Groceries: RM
Cinema: RM
Others: RM
Total: RM0
Affin Bank
Total
of Transaction Amount
(RM per month) |
AFFIN BONUS (%)
|
100
-1,500
|
0.4
|
Above
1,500
|
0.8
|
Alliance Bank
|
CLASSIC | GOLD | PLATINUM | YOU:NIQUE REBATES | ||||
Cash Back Payout Table | Cash Back Factor | Monthly Spending Range (RM) | Cash Back Factor | Monthly Spending Range (RM) | Cash Back Factor | Monthly Spending Range (RM) | Cash Back Factor | Monthly Spending Range (RM) |
Tier 1 Tier 2 Tier 3 Tier 4 |
0.50% 0.60% 0.80% 1.20% |
0 - 200 201 - 350 351 - 650 651 - 1,000 |
0.55% 0.65% 0.85% 1.30% |
0 - 300 301 - 600 601 - 950 951 - 3,000 |
0.60% 0.70% 0.90% 2.00% |
0 - 500 501 - 1,350 1,351 - 2,550 2,551 - 5,000 |
0.50% 0.70% 0.90% 2.00% |
0 - 500 501 - 1,350 1,351 - 2,550 2,551 - 5,000 |
Monthly spending cap will apply. No cash back will be awarded for retail spending of RM1,001 and above for Alliance Bank Classic Credit Card, RM3,001 and above for Alliance Bank Gold Credit Card and RM5,001 and above for Alliance Bank Platinum and You:nique Rebates Credit Card. | ||||||||
Interest Savings | 0% Interest on retail spending for first 3 months* | 0% Interest on retail spending for first 3 months* | 0% Interest on retail spending for first 3 months* | 0% Interest on retail spending for first 3 months* | ||||
* Only applicable to new Cardmembers. | ||||||||
* No interest charged on outstanding balance for retail transactions for the first 3 months from card account creation date, thereafter interest at the rate of up to 17.5% p.a. per month applies. | ||||||||
Timeless Bonus Point (TBP) |
1 TBP for every RM1 spent^ | 1 TBP for every RM1 spent^ | 1 TBP for every RM1 spent^ 2 TBP for every RM1 spent Overseas^ |
1 TBP for every RM1 spent^ | ||||
^ Retail Spending only, excluding petrol & government agencies transactions. |
Highest Cash Back=
Citibank Cash Back Platinum Card
Rebate Category | Cash Rebates | Total Purchase Entitled for Cash Rebates |
Petrol | 5.0% | Up to RM600 per month |
Groceries | 2.0% | Up to RM3, 000 per month |
Pharmaceutical | 2.0% | Unlimited |
Telecommunication | 2.0% | Unlimited |
Other purchases | 0.3% | Unlimited |
OCBC TITANIUM
Rebate Category | Cash Rebates |
Petrol | 5.0% |
Groceries | 5.0% |
Dining | 5.0% |
Bill | 5.0% |
Other purchases | 1.0% |
UOB ONE CARD
Rebate Category | Cash Rebates | Total Purchase Entitled for Cash Rebates | Merchants |
Petrol | 5.0% | Up to RM600 per month | All petrol stations |
Cinema | 5.0% | Unlimited | Golden Screen Cinemas |
Groceries | 2.0% | Up to RM1, 500 per month | Tesco, Carrefour, Giant, Cold Storage & Pasar Raya Jaya Grocer |
Pharmaceutical | 2.0% | Unlimited | Guardian, Watsons & Caring Pharmacy |
Telecommunication | 2.0% | Up to RM300 per month (Effective from 1st December 2011) |
All major mobile service providers |
Other purchases | 0.3% | Unlimited | All other merchants not listed above ^ |
Addition to UOB
SMART$ CASH PROGRAMME :
Sushi King | 10% | GSC | 5% | |
San Francisco Coffee | 10% | Harvey Norman | 2% | |
Delicious | 5% | Firefly | 2% | |
Godiva | 5% | BHPetrol | 2% | |
Charles & Keith | 5% | SenQ | 1% | |
Pedro | 5% | Watatime | 1% |
Conclusion:
Apply two card, UOB and OCBC
Use UOB One card for petrol, cinema, pharmaceutical and any smart cash merchant's transaction.
Use OCBC TITANIUM for other transactions
Tuesday, November 15, 2011
Comparison Between Malaysia Fixed Deposit Accounts
Banking Institution | With Effect From | Percentage (%) Per Annum | |||||||||||
1-mth | 2-mth | 3-mth | 4-mth | 5-mth | 6-mth | 7-mth | 8-mth | 9-mth | 10-mth | 11-mth | 12- mth | ||
Affin Bank Berhad | 12/05/2011 | 3.05 | 3.05 | 3.10 | 3.10 | 3.10 | 3.25 | 3.25 | 3.25 | 3.35 | 3.35 | 3.35 | 3.60 |
Alliance Bank Malaysia Berhad | 08/10/2012 | 3.00 | 3.00 | 3.00 | 3.00 | 3.00 | 3.10 | 3.10 | 3.10 | 3.10 | 3.10 | 3.10 | 3.20 |
AmBank (M) Berhad | 27/11/2013 | 2.95 | 2.95 | 3.00 | 3.00 | 3.00 | 3.10 | 3.10 | 3.10 | 3.10 | 3.10 | 3.10 | 3.15 |
BSN | 01/12/2013 | 3.00 | 3.00 | 3.05 | 3.10 | 3.20 | |||||||
CIMB Bank Berhad | 22/05/2013 | 3.00 | 3.00 | 3.05 | 3.05 | 3.05 | 3.10 | 3.10 | 3.10 | 3.10 | 3.10 | 3.10 | 3.15 |
Citibank Berhad | 10/01/2013 | 2.80 | 2.80 | 2.90 | 2.90 | 2.90 | 2.90 | 2.90 | 2.90 | 2.90 | 2.90 | 2.90 | 3.05 |
Hong Leong Bank Berhad | 13/05/2011 | 2.90 | 2.90 | 2.95 | 2.95 | 2.95 | 2.95 | 2.95 | 2.95 | 2.95 | 2.95 | 2.95 | 3.10 |
HSBC Bank Malaysia Berhad | 11/06/2013 | 2.75 | 2.75 | 2.95 | 2.95 | 2.95 | 3.00 | 3.00 | 3.00 | 3.00 | 3.00 | 3.00 | 3.10 |
MAYBANK | 17/12/2012 | 3.00 | 3.00 | 3.05 | 3.05 | 3.05 | 3.10 | 3.10 | 3.10 | 3.10 | 3.10 | 3.10 | 3.15 |
OCBC Bank (Malaysia) Berhad | 29/04/2011 | 2.75 | 2.75 | 2.85 | 2.85 | 2.85 | 2.90 | 3.05 | 3.05 | 3.05 | 3.05 | 3.05 | 3.05 |
Public Bank Berhad | 15/11/2011 | 3.00 | 3.00 | 3.05 | 3.05 | 3.05 | 3.10 | 3.10 | 3.10 | 3.10 | 3.10 | 3.10 | 3.15 |
RHB Bank Berhad | 13/01/2012 | 3.00 | 3.00 | 3.05 | 3.05 | 3.05 | 3.10 | 3.10 | 3.10 | 3.10 | 3.10 | 3.10 | 3.20 |
Standard Chartered Bank Malaysia Berhad | 29/10/2012 | 2.75 | 2.75 | 2.90 | 2.90 | 2.90 | 2.90 | 2.90 | 2.90 | 2.95 | 2.95 | 2.95 | 3.05 |
United Overseas Bank (Malaysia) Berhad | 19/03/2014 | 2.90 | 2.90 | 2.95 | 2.95 | 2.95 | 2.95 | 2.95 | 2.95 | 2.95 | 2.95 | 2.95 | 3.10 |
1st: Affin Bank
2nd: RHB
3rd: Alliance
For >=12 month:
1st: Affin Bank
2nd: BSN
3rd: RHB
Monday, November 7, 2011
CakePHP 2.0 bake
$ export PATH="{your cakephp directory}/lib/Cake/Console:$PATH
$ cd {your cakephp directory}
$ cake bake
$ cd {your cakephp directory}
$ cake bake
Sunday, November 6, 2011
dyndns vs ddclient
- Register free domain in dyn.com
It's free, although there are "Add to Cart" button
- Install ddclient
- configure ddclient
$ nano /etc/ddclient/ddclient.conf
- At the end of the ddclient.conf
use=web, web=checkip.dyndns.com/, web-skip='IP Address' login={your-username} password={your-password} protocol=dyndns2 server=members.dyndns.org {your registered domain}
- Save the ddclient.conf and restart ddclient
PHP 5.3 : date.timezone
Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Kuala_Lumpur' for 'MYT/8.0/no DST' instead in /var/www/html/fridae/lib/Cake/Cache/Cache.php on line 513 Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Kuala_Lumpur' for 'MYT/8.0/no DST'
To solve this in php 5.3, open the php.ini
$ nano /etc/php.ini
Search [Date], and change the ;date.timezone = to
date.timezone ='Asia/Kuala_Lumpur'
Restart apache
$ /etc/init.d/httpd restart
Refer:http://chrisjean.com/2011/06/24/php-5-3-and-system-timezone-settings/
To solve this in php 5.3, open the php.ini
$ nano /etc/php.ini
Search [Date], and change the ;date.timezone = to
date.timezone ='Asia/Kuala_Lumpur'
Restart apache
$ /etc/init.d/httpd restart
Refer:http://chrisjean.com/2011/06/24/php-5-3-and-system-timezone-settings/
Upgrade php 5.1 to 5.3 in CentOS
Remove PHP package
$ sudo yum remove php php-cli php-common php-devel php-gd php-mbstring \ php-mysql php-mcrypt php-pdo php-pear php-pgsql php-xml php-xmlr
Install PHP 5.3
$ sudo yum install php53 php53-cli php53-common php53-devel php53-gd \ php53-mbstring php53-mysql php53-pdo php53-pgsql php53-xml php53-xmlrpc
Restart apache
$ sudo /etc/init.d/httpd restart
Refer:http://chrisjean.com/2011/06/24/upgrade-php-5-1-or-5-2-to-5-3-on-centos/
Wednesday, November 2, 2011
Relationship Type
class A extends AppModel {
var $name = 'A';
var $hasOne = array(
'E' => array(
'className' => 'E',
'conditions' => '',
'dependent' => true
)
);
var $belongsTo = array(
'D' => array(
'className' => 'D',
'foreignKey' => 'd_id'
)
);
var $hasMany = array(
'C' => array(
'className' => 'C',
'foreignKey' => 'a_id',
'conditions' =>'',
'order' => '',
'limit' => '',
'dependent'=> true
)
);
var $hasAndBelongsToMany = array(
'B' =>array(
'className' => 'B',
'joinTable' => 'as_bs',
'foreignKey' => 'a_id',
'associationForeignKey' => 'b_id',
'unique' => true,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'finderQuery' => '',
'deleteQuery' => '',
'insertQuery' => ''
)
);
}
refer:http://book.cakephp.org/view/1040/Relationship-Types
Subscribe to:
Posts (Atom)