phpBB db schema outside of phpBB

PHP coding talk.

Moderator: Moderators

phpBB db schema outside of phpBB

Postby webnoobie on Mon Feb 05, 2007 5:17 am

Hello,

Is there a way to use the MySQL class from mysql.php in the /db/ directory outside of the phpBB? In other words, how could I use the db/mysql.php class in another open source software that will be able to connect to phpBB if the user chooses to? The mysql class needs to be used first though. How would I go about doing this?

Thanks in advanced. Most appreciated!
Best Regards:
webnoobie
webnoobie
Registered User
Registered User
 
Posts: 366
Joined: Wed Jun 08, 2005 10:38 pm
Location: My Computer

Postby PostBot on Mon Feb 05, 2007 10:17 am

Yep, you can use it, and I don't think it requires any modifications at all.
Do NOT pm me, I don't visit this forum anymore, don't own it, don't provide any support and don't moderate.
User avatar
PostBot
Moderator
Moderator
 
Posts: 10659
Joined: Sat Aug 02, 2003 3:52 pm
Location: Mars

Postby DoubleJ on Mon Feb 05, 2007 11:01 am

On the question how:

Code: Select all
<?php
// do you init
include('mysql.php');
$dbserver = 'localhost';
$dbuser = 'root';
$dbpass = '1234!@#$';
$dbname = 'mydb';
$db = new sql_db($dbserver, $dbuser, $dbpass, $dbname);
unset($dbpass);
// continue your code.
It never hurts to help.....
[ My phpBB Mods and Styles ]
My Mod: [ Simple Shoutbox Mod ]
[ DoubleJWeb ] [ Get Opera ]
User avatar
DoubleJ
Moderator
Moderator
 
Posts: 716
Joined: Sat Jan 22, 2005 9:58 pm
Location: DoubleJWeb.Net


Return to PHP Programming

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron