IP.Board 3.30.x comes with a built in database class. This will perform just about any database query you may have. Below are some of the basics.
Database Select
Database Insert
Database Delete
You can also add different code to your query, including where, order and limit.
Where
Order
Limit
Some areas of IP.Board 3 may require you to setup the DB object at the construct like so.
Database Select
$this->DB->build( array( 'select' => '*', 'from' => 'db_table' ) ); $this->DB->execute(); $r = $this->DB->fetch();
Database Insert
$this->DB->insert( 'db_table', array ( 'row1' => "row1", 'row2' => "row2", 'row3' => "row3", ) );
Database Delete
$this->DB->delete( 'db_table', '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)
Some areas of IP.Board 3 may require you to setup the DB object at the construct like so.
$this->DB = $this->registry->DB();











