$order is an array showing multiple columns on which sorting and their order

$order = array(array('column' => 'article_date',
'order' => 'desc'));

or:

$order = array('article_date' => 'desc');

$limit is a simple array indicating offsets limitations of the query

$limit = array('start' => 0,
'length' => 10);

Count

To count the number of entries in a table (or recordsets), use the countModels() function:

$model->countModels($table,
$join,
$where,
$group);

Parameters are the same as the searchModels() function.

Delete

By analogy, to remove N entries in a table, use the deleteModels() function:

$model->deleteModels($table,
$join,
$where);

Parameters are the same as the searchModels() & deleteModels() functions

Exec

If you want to run the query of your choice (at your own risk), use the exec() function:

$model->exec("SHOW FULL COLUMNS FROM `article`");

Transaction Begin

If you want to begin a transaction, use the beginTransaction() function:

$model->beginTransaction();

Transaction Commit

If you want to validate a transaction, use the commitTransaction() function:

$model->commitTransaction();

Transaction Rollback

If you want to cancel a transaction, use the rollbackTransaction() function:

$model->rollbackTransaction();

Custom SQL function

If you want to call a SQL function of the current Model, use the callSqlFunction() function:

$model->callSqlFunction($functionName, $param1, …, $paramN);

XML building

Current recordset

If you want to easily getting the XML of the current recordset binded by the getModel($id) function, you can call the toXML() function:

if ($news->getModel(118) === true)
$xml = $news->toXML($xml);

Will produce:

<View>
<news>
<news_id><![CDATA[118]]></news_id>
<pk_lang><![CDATA[en]]></pk_lang>
<news_title><![CDATA[ fake_news_title ]]></news_title>
<news_content><![CDATA[<p>news content en</p>]]></news_content>
<news_excerpt><![CDATA[<p>Fake excerpt</p>]]></news_excerpt>
<news_more><![CDATA[<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>]]></news_more>
<news_date><![CDATA[2012-06-08 17:45:32]]></news_date>
<news_published><![CDATA[true]]></news_published>
<news_photo><![CDATA[news/new_york_4_640345cff7.jpg]]></news_photo>
<news_url><![CDATA[http://www.sillysmart.org]]></news_url>
<article_category_id><![CDATA[1]]></article_category_id>
<user_id><![CDATA[4]]></user_id>
</news>
</View>

1st parameter $xml is the XML modified by the current action

2nd parameter $options allows to specify transformations on some columns

Each column can undergo many transformations as necessary (in the order they are
declared).

The formalism of the transformation can be of two types:
- Prefix "php": using a native function php (no class)
- Name of the class: using a static function of the class of your choice.

In both cases, the following parameters correspond to the function name and all the parameters of the latter.
If the function does not exist or it is called with an insufficient number of parameters, it raises an error.
If the function is called with too many parameters, it raises a warning.

3rd parameter $fks can specify whether you want to retrieve related tables. These possible values ​​are exactly the same as for the function getParams(): default false to any joint, true to all related tables or array wanted tables.

$fks = array('user');

4th parameter $nodeName can specify the name by hand to form the XML node.
The default is the table name to be used.

$nodeName = 'my_news';

With these parameters filled, the resulting XMLshould look like:

<View>
<my_news>
<news_id><![CDATA[118]]></news_id>
<pk_lang><![CDATA[en]]></pk_lang>
<news_title><![CDATA[fake_news_title]]></news_title>
<news_content><![CDATA[<p>news content en</p>]]></news_content>
<news_excerpt><![CDATA[Fake excerpt]]></news_excerpt>
<news_more><![CDATA[<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>]]></news_more>
<news_date><![CDATA[08 June 2012]]></news_date>
<news_published><![CDATA[true]]></news_published>
<news_photo_original><![CDATA[http://www.sillysmart.org/Public/Files/news/new_york_4_640345cff7.jpg]]></news_photo_original>
<news_photo_0><![CDATA[http://www.sillysmart.org/Public/Files/news/new_york_4_640345cff7_0.jpg]]></news_photo_0>
<news_url><![CDATA[http://www.sillysmart.org]]></news_url>
<article_category_id><![CDATA[1]]></article_category_id>
<user_id><![CDATA[4]]></user_id>
<user_email><![CDATA[guillaume.chatton@wandi.fr]]></user_email>
<user_name><![CDATA[Chatton]]></user_name>
<user_firstname><![CDATA[Guillaume]]></user_firstname>
<user_date><![CDATA[2011-11-23 17:02:34]]></user_date>
</my_news>
</View>

Current collection of recordsets

If you want to easily getting the XML for a PDO collection of recordsets (obtained by the call to the function searchModels() eg), you can call the pdoToXML() function: