Raised This Month: $ Target: $400
 0% 

Switch between 2 databases


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
IAmReallyCool
Member
Join Date: Nov 2013
Old 01-09-2014 , 07:50   Switch between 2 databases
Reply With Quote #1

Hello. What I want to do is to switch between two DBs in one plugin, for example i save my points into 'points' DATABASE and i want to save logs into 'bans' database. How can I switch between 2 databases in PAWN? I know in php its pretty easy :
PHP Code:
mysql_query("USE points"); 
PHP Code:
mysql_query("USE bans"); 
How can I do something similar in PAWN?
IAmReallyCool is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-09-2014 , 07:52   Re: Switch between 2 databases
Reply With Quote #2

1 tuple per database, simply create a second tuple
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
IAmReallyCool
Member
Join Date: Nov 2013
Old 01-09-2014 , 13:39   Re: Switch between 2 databases
Reply With Quote #3

Wont it overload server heavily if I save ADMIN ACTIONS (e.g. Kick, Slay, Gag, Ban) to MYSQL. I mean on every cmd use MYSQL QUERIES will be called, wont it overload server?
IAmReallyCool is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-09-2014 , 14:06   Re: Switch between 2 databases
Reply With Quote #4

Use SQL_ThreadQuery if you are worried about that
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou 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 10:15.


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