Raised This Month: $51 Target: $400
 12% 

Easy sql-database question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TerroriZe
Member
Join Date: Dec 2009
Old 05-14-2010 , 06:14   Easy sql-database question
Reply With Quote #1

Good morning!
I got a sql database at addons/eventscripts/myplugin/names.sqlite ...
How to connect to it? Or what do I have to write in the databases.cfg?

Know this is a noob question but the search bar didn give me any solutions
TerroriZe is offline
TerroriZe
Member
Join Date: Dec 2009
Old 05-15-2010 , 13:29   Re: Easy sql-database question
Reply With Quote #2

ok seems like the question was harder than I thought, coz nobody can answer it ;P

My problem is that SQL_Connect retrieves its database data from the databases.cfg and all sqlite files in the databases.cfg have to be located in the sourcemod folder...

Am I right, wrong, too stupid to see it? ..
TerroriZe is offline
p3tsin
Senior Member
Join Date: Sep 2005
Location: Finland
Old 05-15-2010 , 17:29   Re: Easy sql-database question
Reply With Quote #3

Quote:
Originally Posted by TerroriZe View Post
ok seems like the question was harder than I thought, coz nobody can answer it ;P

My problem is that SQL_Connect retrieves its database data from the databases.cfg and all sqlite files in the databases.cfg have to be located in the sourcemod folder...

Am I right, wrong, too stupid to see it? ..
Okay. SourceMod looks for the files under sourcemod/data/sqlite/ directory. Your best bet is to try go up that directory tree with ..'s and then point it to the file in the eventscripts dir. Note that SourceMod requires the extension of the file to be .sq3, so .sqlite wont work.

Setting the value of the "database" field to this should do it as long as youre able to change the file extension
Code:
../../../eventscripts/myplugin/names.sq3
__________________
plop
p3tsin is offline
TerroriZe
Member
Join Date: Dec 2009
Old 05-15-2010 , 18:48   Re: Easy sql-database question
Reply With Quote #4

ah damn you are right ;S Then I gotta find another way.. anyways ty very much, that helped alot^^
TerroriZe 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 08:05.


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