Raised This Month: $ Target: $400
 0% 

database help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SSJ2GOKU
Senior Member
Join Date: Oct 2005
Location: Belgium
Old 05-05-2006 , 11:27   database help
Reply With Quote #1

hello,

can anyone explain meh how to write to and read from a database file
also how do you use the stuff you get out of the database then?


thanks in advance
SSJ2GOKU is offline
Send a message via MSN to SSJ2GOKU
Rixorster
Senior Member
Join Date: Jul 2005
Old 05-05-2006 , 12:28  
Reply With Quote #2

Code:
// Creds: HRP for most of thingys :P #include <dbi> #include <engine> new Sql:dbc public plugin_init() {     register_plugin("Sql","1.0","Rixorster")     register_cvar("mysql_host","localhost",FCVAR_PROTECTED)     register_cvar("mysql_db","database",FCVAR_PROTECTED)     register_cvar("mysql_user","root",FCVAR_PROTECTED)     register_cvar("mysql_pass","",FCVAR_PROTECTED) public sql_init() {     new host[64]     new username[33]     new password[32]     new dbname[32]     new error[32]     get_cvar_string("mysql_host",host,64)     get_cvar_string("mysql_user",username,32)     get_cvar_string("mysql_pass",password,32)     get_cvar_string("mysql_db",dbname,32)     database = dbi_connect(host,username,password,dbname,error,32)     if (dbc == SQL_FAILED)     {         server_print("You fail at life^n")     }     else     {     server_print("Gg!^n")     } }
__________________
You never know, what will happen the day after tomorrow...

+karma if i helped you!
Rixorster is offline
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 07-14-2006 , 00:25   Re: database help
Reply With Quote #3

Quote:
--- ESF AMXX CODER ---
Inappropriate use of a title. I pitty you.
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
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:14.


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