View Single Post
Old 07-14-2008, 04:51 PM   #2 (permalink)
Ross
The Contributor
 
Ross's Avatar
 
Join Date: Jan 2008
Location: England, UK
Posts: 83
Thanks: 3
Ross is on a distinguished road
Default

Quote:
Originally Posted by abiko View Post
Database Backend
For every aspect of database operations there is a single class for it - connect to the database, select, insert etc..
Here is a sample how to get a data from the table:
PHP Code:
$select = new x3Database_Select();
$select->Select'title, sadrzaj');
$select->From('frame_blog');
$select->Where( array( 'user_id' => '2''active' => '1') );
$select->Limit('0,10');

$handle $select->exec();
while( 
$r x3Database_Fetch::Assoc$handle ) ) {
       
$kr[] = $r;

I woukld prefer it all in the __constructor, like so:

PHP Code:
$select = new x3Database_Select($database_conn'*''tbl_name', array( 'user_id' => '2''active' => '1'), 030); 
And then return results in MySQLi Result class style.
Ross is offline  
Reply With Quote
The Following User Says Thank You to Ross For This Useful Post:
abiko (07-14-2008)