Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Models contain most of the business logic in Magento modules
2
votes
2
answers
10k
views
Fetch Single Record from Custom Module Table
For example:
Mage::getModel('module/model')->addFieldToFilter('customer_id', array('eq' => $customerId));
The above code should give me a single record instead of giving a collection. … If I use below code:
Mage::getModel('module/model')->getCollection()->addFieldToFilter('customer_id', array('eq' => $customerId));
it gives me a record in array, and I do not want to use a loop to fetch …
1
vote
2
answers
3k
views
Filter Collection using Mysql4 Model
$this->_init('module/model','id');
}
}
My frontend .phtml file, I am using below code to call my custom collection
<? … Or do I need to add my filter function in Model/Mysql4/Modulename.php file ?
It also throws an exception of Unrecognized method 'getSize()
Please Guide.
Thanks …