Database Queries
A few basic examples of IPB built in database class.
Database Select
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'db_table' ) ); $this->ipsclass->DB->simple_exec();
$r = $this->ipsclass->DB->fetch_row();
Database Insert
$this->ipsclass->DB->do_insert( 'db_table', array ( 'row1' => "row1", 'row2' => "row2", 'row3' => "row3", ) );
Database Delete
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'db_table', 'where' => 'id=1' ) );
You can also add different code to your query, including where, order and limit.
Where
'where' => 'id=1'
Order
'order' => 'date DESC'
Limit
'limit' => array(0,1)
Company News