Raised This Month: $ Target: $400
 0% 

How to have more than one Database?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
freakdk
Junior Member
Join Date: Aug 2009
Old 12-08-2009 , 16:38   How to have more than one Database?
Reply With Quote #1

Hello!
I am currently needing 2 databases in the database.cfg
But i can't figure out how to add 2

I need one of them for SourceBans
And one for S.A.D: http://forums.eventscripts.com/viewtopic.php?t=33215

But nomatter how I add the exstra one, I won't work

here's how my database.cfg looks like:

Quote:
"Databases"
{
"driver_default" "mysql"

"sourcebans"
{
"driver" "default"
"host" "xxx"
"database" "xxx"
"user" "xxx"
"pass" "xxx"
//"timeout" "0"
//"port" "0"
}

}
"driver_default" "mysql"

"default"
{
"driver" "default"
"host" "localhost"
"database" "xxx"
"user" "xxx"
"pass" "xxx"
//"timeout" "0"
//"port" "0"
}

}

"storage-local"
{
"driver" "sqlite"
"database" "sourcemod-local"
}

"clientprefs"
{
"driver" "sqlite"
"host" "localhost"
"database" "clientprefs-sqlite"
"user" "root"
"pass" ""
//"timeout" "0"
//"port" "0"
}
}
So how would I make it so both the S.A.D database will work and the SourceBans will work - At the same time?

Thanks for your answers!

Kind regards

Niclas - FreakDk
freakdk is offline
freakdk
Junior Member
Join Date: Aug 2009
Old 12-08-2009 , 16:39   Re: How to have more than one Database?
Reply With Quote #2

Don't know if this is the right forum to post in, but I hope it is
freakdk is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 12-08-2009 , 18:50   Re: How to have more than one Database?
Reply With Quote #3

Code:
"Databases"
{
    "driver_default"    "mysql"
    
    "default"
    {
        "driver"        "default"
        "host"            "localhost"
        "database"        "xxxx"
        "user"            "xxxx"
        "pass"            "xxxx"
        //"timeout"        "0"
        //"port"        "3306"
    }
    
    "storage-local"
    {
        "driver"        "sqlite"
        "database"        "sourcemod-local"
    }
    
    "clientprefs"
    {
        "driver"        "sqlite"
        "host"            "localhost"
        "database"        "clientprefs-sqlite"
        "user"            "root"
        "pass"            ""
        //"timeout"        "0"
        //"port"        "0"
    }
    
    "S.A.D"
    {
        "driver"        "default"
        "host"            "myhost.com"
        "database"        "sad_stuff"
        "user"            "username"
        "pass"            "password"
        "port"            "3306"
    }
}
Like so. You don't copy the stuff that's already in there, you just add another entry to go along with the plugin you're using. What exactly you have to use as the entry's title, I don't know, as I don't know what "S.A.D" is.
bl4nk is offline
freakdk
Junior Member
Join Date: Aug 2009
Old 12-09-2009 , 06:03   Re: How to have more than one Database?
Reply With Quote #4

Well S.A.D, i borught the link :9
Is a "thing" that does that ppl can donate on a website for admin, on my site it is:
www.powerhawks.ukgamers.com/sad
And when they have paid their steam id will automatticly be added to the list of admins.
freakdk is offline
freakdk
Junior Member
Join Date: Aug 2009
Old 12-09-2009 , 06:03   Re: How to have more than one Database?
Reply With Quote #5

But I would like to HUGELY thank you for this! It's just so wonderfull Now I can use both SB and SAD brilliant!!
freakdk is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode