Quantcast
Channel: Elxis CMS documentation
Viewing all articles
Browse latest Browse all 37

Prepared statements

$
0
0
PDO prepared statements and the elxisPDOStatement class
Elxis does extend use of prepared statements to execute queries to the database. Class elxisPDOStatement extends PDO's PDOStatement class providing some usefull methods like fetchAllAssoc and fetchPairs. The default fetch mode is PDO::FETCH_OBJ (fetch result sets as objects). There are 2 methods to prepare a statement, prepare without limit capabilities and prepareLimit with limit capabilities (PDO lucks limiting database results and so elxisDatabase fixes that). Both of these methods return an elxisPDOStatement instance.

Viewing all articles
Browse latest Browse all 37

Trending Articles