11-07-2020, 03:59 PM
Let's build a PDO connection class to query the MyBB database.
create xquery class
We'll set the default fetch mode in the options, and override the default using a function parameter to change it dynamically where needed. Fetch modes can be an object, or array, or both.
create xquery class
PHP Code:
$sql = 'SELECT * FROM mybb_users';
$xq = (new xQuery($host, $database, $username, $password, $charset ));
$sth = $xq->prepare( $sql );
$data = $sth->fetch();
We'll set the default fetch mode in the options, and override the default using a function parameter to change it dynamically where needed. Fetch modes can be an object, or array, or both.
[ Ninja Admins Community Manager ]
