
Search In
How to Clean log in Magento for database maintenance & site performance ?
Log cleaning gives dramatic improvement in site performance. Manage DB through log cleaning decrease DB size which gives better site performance. There are 2 ways to perf
In magento if we are required to work on SQL and Database with the query to find the max and count of the fields in database then we can perform it as :
public function countUs(){
$table = $this->getMainTable();
$where = $th
Joins in database, We can easily determine the meaning of joins very easily. In database we use the concept of joining in tables to fetch the data combination. There
are different type of methods of joining two or more than two tables in database. Y
While working with ADO.NET you need to understand the thing why SqlCommand is used.
We have two kind of operations related to database:
1 That will make changes in the database
Insert
Update
Delete
2 That will n
Steps to describe Local magento to live server ?
Copy all of your local files to server
Delete the content of the /var folder
Export magento database from localhost and import it i
Here is useful parameters used by multiple methods in OpenERP
cr: database connection (cursor)
uid: id of user performing the operation
ids: record ids to perform the operation on
context: optional dictionary of contextual parameters
For example-
de
Hello reader's! If you have an array with multiple values to match with database coloumn. Then you can use IN statement in mysql but you have to explode the array first.
let's see the exampkle below:-
$findIN= implode(',', $YourArray); // first you
If you want to use model reference in OpenERP(Odoo) follow the below mentioned code and paste it in your (Python).py file: →
class openerp.models.Model(pool, cr)
class user(Model):
Note-Above code are created by inheriting from this clas
Api.onchange will trigger the call to the decorated function if any of the fields specified in the decorator is changed in the form:
In below code you can use in your .py file.
@api.onchange('fieldx')
def do_stuff(self):
if self.fieldx == x:
self.fi
/----------Get products collection --------------/
<p>$allproducts = Mage::getModel('catalog/product')->getCollection()->addAttributeToSort('name', 'ASC');;</p>
It will return you total products, sorted by name in ascendi