Raised This Month: $ Target: $400
 0% 

Checking from DB


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 03-12-2010 , 18:56   Checking from DB
Reply With Quote #1

How to check if a player has registered his steamid or ip in mysql.

Lets say that i own a site and there you can enter your steamid or ip.My question is how to check if there is such information written.
If there is any to give him some privilege if not to return "you are not signed" or smth like that.
SpeeDeeR is offline
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 03-12-2010 , 19:11   Re: Checking from DB
Reply With Quote #2

Post your database layout (if any).
And read this: http://forums.alliedmods.net/showpos...18&postcount=5
Seta00 is offline
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 03-14-2010 , 11:01   Re: Checking from DB
Reply With Quote #3

Quote:
Originally Posted by Seta00 View Post
Post your database layout (if any).
And read this: http://forums.alliedmods.net/showpos...18&postcount=5
I actually read that ...
I've decided to check for steamid from DB and check session for nonsteam users,because some ppl have dynamic IPs.

Here is the DB
Code:
CREATE TABLE IF NOT EXISTS `users` (
  `id` int(225) NOT NULL auto_increment,
  `username` varchar(225) NOT NULL,
  `password` varchar(225) NOT NULL,
  `email` varchar(225) NOT NULL,
  `ip` varchar(225) NOT NULL,
  `steamid` varchar(255) character set utf8 collate utf8_unicode_ci NOT NULL,
  `editip` varchar(255) NOT NULL,
  `skype` varchar(225) NOT NULL,
  `web` varchar(225) NOT NULL,
  `podpis` varchar(225) NOT NULL,
  `avatar` varchar(225) NOT NULL,
  `level` varchar(225) NOT NULL,
  `date` timestamp NOT NULL default '0000-00-00 00:00:00' on update CURRENT_TIMESTAMP,
  `session` varchar(32) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=cp1251 AUTO_INCREMENT=54 ;
A friend, who is working with mysql,adviced me to check for nonsteam with
Code:
$session=session_id();
I hope this helps
I will give more additional info if needed.
SpeeDeeR is offline
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 03-14-2010 , 15:25   Re: Checking from DB
Reply With Quote #4

Non-Steam users have STEAM_ID_LAN / STEAM_ID_PENDING as their authids.

Use SQLx to query your database.

I'm not coding it for you, this is Scripting Help, not Suggestions / Requests.
Seta00 is offline
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 03-14-2010 , 15:31   Re: Checking from DB
Reply With Quote #5

SELECT id FROM users WHERE steamid='here steam id' OR ip='here ip' LIMIT 1;

then check row num or nextrow...

Just read the SQLx Tutorial.
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
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:40.


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