Raised This Month: $ Target: $400
 0% 

SQL Advice


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 09-19-2007 , 11:53   SQL Advice
Reply With Quote #1

Don't worry ... I'm not a total newb and I know how to use SQL.

This thread is about incorporating it into AMX.
If you have ever used SQL in a plugin you will almost surely be able to help


I'm really quite experienced with SQL itself, and I've taught myself about all I can find to learn about AMX Mod X's SQLX (apart from threaded queries, atm)
[and short of reading lots of plugins ]

But what I really need is some advice on the accepted practice of how to deal with usernames, passwords et c. and also with installing the plugin.

As for usernames:
1) Should I just use the amx_sql_user cvar?
2) Naturally, if so then also for host and for pass, but what about db?
Do people usually take the cvar database or hard-code it?

And installation:
There's a few options here, so it's a little harder.

Option 1) Create a script file to create the tables et c, and tell users to run it when they install the plugin

2) Code this into the plugin ( i.e. if table doesn't exist, run the install code )


The problem with #1 is that users are award-winningly retarded and I really can't be arsed to teach people to run a script.
The problem with #2 is that if they change the amx_sql_db cvar, it will create the tables afresh in the new database.

So, if anyone has experience of using SQL in plugins, a bit of advice would be awesome.

Oh, and finally - do people usually include SQL as "an option" (i.e. as opposed to nVault or w/e) or just as the storage method.

Last edited by purple_pixie; 09-19-2007 at 11:56.
purple_pixie is offline
 



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 16:04.


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