phpBB forum – using the default DB object
Posted by project_00 in Database, SQL, PHP, Perl, OthersHave been doing a little freelance lately, mainly involving integrating new functionality with phpBB.
Using the existing code speeds up development and minimizes redundant code. Below is the code needed to use the default database object in phpBB.
define('IN_PHPBB', true); $phpbb_root_path = './../'; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'common.'.$phpEx); $sql = "SELECT * FROM " . A_TABLE . " WHERE rank_special = 1 ORDER BY a_title"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain ranks data', '', __LINE__, __FILE__, $sql); } else echo "Query successsful";Tags: freelancing, phpBB
Warning: Division by zero in /home/content/p/r/o/project00/html/blog/wp-content/plugins/geshi/geshi.php on line 2310
Warning: Division by zero in /home/content/p/r/o/project00/html/blog/wp-content/plugins/geshi/geshi.php on line 2310
Warning: Division by zero in /home/content/p/r/o/project00/html/blog/wp-content/plugins/geshi/geshi.php on line 2310
Warning: Division by zero in /home/content/p/r/o/project00/html/blog/wp-content/plugins/geshi/geshi.php on line 2310
Warning: Division by zero in /home/content/p/r/o/project00/html/blog/wp-content/plugins/geshi/geshi.php on line 2310
Warning: Division by zero in /home/content/p/r/o/project00/html/blog/wp-content/plugins/geshi/geshi.php on line 2310
Warning: Division by zero in /home/content/p/r/o/project00/html/blog/wp-content/plugins/geshi/geshi.php on line 2310
Related posts:
- phpBB mod uninstallation – tedious I was experimenting with phpBB (a PHP-based forum board) recently and was doing some mod...
- Syntax Highlighting with GeSHi and csh_geshi plugin Pasting code in Wordpress is not an easy task, Wordpress will tend to mess it...

Entries (RSS)