Function mr_queryAndNextRecord
Database query helper. Used to execute a select statement and to return the result of first recordset.
Minimizes following code:
// default way $db = cRegistry::getDb(); $sql = "SELECT * FROM foo WHERE bar='foobar'"; $db->query($sql); $db->nextRecord(); $data = $db->getRecord(); // new way $sql = "SELECT * FROM foo WHERE bar='foobar'"; $data = mr_queryAndNextRecord($sql);
Package: Plugin\ModRewrite
Copyright: www.polycoder.de
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Stefan Seifarth / stese
Author: Murat Purc murat@purc.de
Located at plugins/mod_rewrite/includes/functions.mod_rewrite.php
Copyright: www.polycoder.de
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Stefan Seifarth / stese
Author: Murat Purc murat@purc.de
Located at plugins/mod_rewrite/includes/functions.mod_rewrite.php
string |
$query |
Query to execute |
mixed
|
Assoziative array including recordset or NULL |