Raised This Month: $ Target: $400
 0% 

extract sql


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Iulyy
Junior Member
Join Date: Sep 2007
Location: Romania
Old 12-21-2008 , 16:07   extract sql
Reply With Quote #1

Quote:
new query[512]
admin_id = format(query, 511, "SELECT id FROM amx_amxadmins WHERE username = '%s'", admin_nick)
format(query, 511, "INSERT INTO `%s` (player_id,player_ip,player_nick,admin_ip,adm in_steamid,admin_nick,ban_type,ban_reason,ban _created,ban_length,server_name,server_ip,admin_id) VALUES('%s','%s','%s','%s','%s','%s','%s','%s ','%i','%s','%s','%s:%s','%s')", tbl_bans, player_steamid, player_ip, player_nick, admin_ip, admin_steamid, admin_nick, g_ban_type, g_ban_reason, ban_created, BanLength, server_name, g_ip, g_port, admin_id)
A part of this cod it's from amxbans and i'm not sure if admin_id it's corect.
In this script i want to extract admin id from the datebase and insert if a admin is banning a player.
I hope you understund what i want to say because my english is not to good.
__________________
loading...
Iulyy is offline
Send a message via Yahoo to Iulyy
Old 12-24-2008, 07:59
Iulyy
This message has been deleted by YamiKaitou. Reason: bump
griefhy
Member
Join Date: Jul 2006
Old 12-24-2008 , 08:54   Re: extract sql
Reply With Quote #2

if admin kick or ban someone,be recorded to the database, yes ???
so ,your problem is ??????
griefhy is offline
Iulyy
Junior Member
Join Date: Sep 2007
Location: Romania
Old 12-24-2008 , 13:21   Re: extract sql
Reply With Quote #3

Yes, the problem is i don't know ho to extract admin id from amx_amxadmins (database) to insert in to amx_bans.
__________________
loading...
Iulyy is offline
Send a message via Yahoo to Iulyy
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 12-24-2008 , 17:09   Re: extract sql
Reply With Quote #4

Show me the tables, I'll make you a query, please put them exactly how they are... and an example of one row each. I'm to lazy to go look up the structure.
Styles is offline
Send a message via AIM to Styles
Iulyy
Junior Member
Join Date: Sep 2007
Location: Romania
Old 12-24-2008 , 17:20   Re: extract sql
Reply With Quote #5

Quote:
CREATE TABLE `amx_amxadmins` (
`id` int(12) NOT NULL auto_increment,
`username` varchar(32) default NULL,
`password` varchar(32) default NULL,
`access` varchar(32) default NULL,
`flags` varchar(32) default NULL,
`steamid` varchar(32) default NULL,
`nickname` varchar(32) NOT NULL default '',
`forum_id` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=46 DEFAULT CHARSET=latin1 AUTO_INCREMENT=46 ;
Quote:
CREATE TABLE `amx_bans` (
`bid` int(11) NOT NULL auto_increment,
`player_ip` varchar(100) default NULL,
`player_id` varchar(50) NOT NULL default '0',
`player_nick` varchar(100) NOT NULL default 'Unknown',
`admin_ip` varchar(100) default NULL,
`admin_steamid` varchar(50) NOT NULL default '0',
`admin_nick` varchar(100) NOT NULL default 'Unknown',
`ban_type` varchar(10) NOT NULL default 'S',
`ban_reason` varchar(255) NOT NULL default '',
`ban_created` int(11) NOT NULL default '0',
`ban_length` varchar(100) NOT NULL default '',
`server_ip` varchar(100) NOT NULL default '',
`server_name` varchar(100) NOT NULL default 'Unknown',
`admin_id` varchar(50) NOT NULL default '0',
PRIMARY KEY (`bid`)
) ENGINE=MyISAM AUTO_INCREMENT=755 DEFAULT CHARSET=latin1 AUTO_INCREMENT=755 ;
__________________
loading...
Iulyy is offline
Send a message via Yahoo to Iulyy
Iulyy
Junior Member
Join Date: Sep 2007
Location: Romania
Old 01-10-2009 , 16:36   Re: extract sql
Reply With Quote #6

Somebody help me please i'm despered!!!
__________________
loading...
Iulyy is offline
Send a message via Yahoo to Iulyy
X0Left4dead0X
BANNED
Join Date: Jan 2009
Old 01-10-2009 , 16:44   Re: extract sql
Reply With Quote #7

Amxx scripting and maybe we can help you the sma of this sql database thing. Make sure you remove all your private sql info I.e
PHP Code:
sql_password="blahblah <<< this" 
X0Left4dead0X is offline
Iulyy
Junior Member
Join Date: Sep 2007
Location: Romania
Old 01-11-2009 , 03:44   Re: extract sql
Reply With Quote #8

You can modify the original sma from amxbans and i think is the cmdBan.inl in folder amxbans.
__________________
loading...

Last edited by Iulyy; 01-11-2009 at 03:52.
Iulyy is offline
Send a message via Yahoo to Iulyy
X0Left4dead0X
BANNED
Join Date: Jan 2009
Old 01-11-2009 , 05:57   Re: extract sql
Reply With Quote #9

The admin_bansql.sma or what ever it is please or no help i mean yours...
X0Left4dead0X 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 09:08.


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