Can SMF get data from another database?

Started by @DaLgakıran, March 01, 2011, 06:06:32 PM

Previous topic - Next topic

@DaLgakıran

As you know, SMF's default database name is smf. But I want to get datas from another database in my MYSQL using SMF. Is it possible?


Arantor

Sure you can, assuming the SMF database's user has access to that database too.

$smcFunc isn't restricted to using SMF's own database, though you will have to specify the name of the database in the query, e.g. SELECT * FROM yaris_sunucusu.table

Can't be more specific without more information though.

@DaLgakıran

Quote from: Arantor on March 01, 2011, 06:34:17 PM
Sure you can, assuming the SMF database's user has access to that database too.

$smcFunc isn't restricted to using SMF's own database, though you will have to specify the name of the database in the query, e.g. SELECT * FROM yaris_sunucusu.table

Can't be more specific without more information though.
Thanks. I'll try.

Arantor

Yes, so did I.

You have to use the full database name as part of the query. I do it all the time. As in SELECT * FROM my_other_database.my_other_dbs_table

Advertisement: