Crisp
10-22-2009, 07:24 PM
I want to connect two databases, but I can't.
This is what I have:
<?php
mysql_connect("localhost","root");
$mybbDb = mysql_select_db("mybb2");
//RevBB
$revbbDb = mysql_select_db("newbb");
$users = mysql_query(
"SELECT `uid`
FROM `$mybbDb.myf_users`"
)or die(mysql_error());
while($user = mysql_fetch_array($users))
{
echo $user['uid'];
}
First off, I'm not using the Newbb database, and I don't need to right yet.
The problem is, I can't connect to the MyBB2 database. Gives me:
Incorrect table name '1.myf_users'
Can someone help me?
Thanks.
This is what I have:
<?php
mysql_connect("localhost","root");
$mybbDb = mysql_select_db("mybb2");
//RevBB
$revbbDb = mysql_select_db("newbb");
$users = mysql_query(
"SELECT `uid`
FROM `$mybbDb.myf_users`"
)or die(mysql_error());
while($user = mysql_fetch_array($users))
{
echo $user['uid'];
}
First off, I'm not using the Newbb database, and I don't need to right yet.
The problem is, I can't connect to the MyBB2 database. Gives me:
Incorrect table name '1.myf_users'
Can someone help me?
Thanks.