Raised This Month: $ Target: $400
 0% 

[TF2] VIP that works with mysql?


Post New Thread Reply   
 
Thread Tools Display Modes
atticusmas
Senior Member
Join Date: Jul 2011
Location: I am a hallucination
Old 08-17-2011 , 14:10   Re: [TF2] VIP that works with mysql?
Reply With Quote #21

Quote:
Originally Posted by Dr. McKay View Post
Do you know PHP? If not, I could set it up for you for a small charge.
i dont. how much?
__________________
<a href="http://www.gametracker.com/server_info/8.6.15.53:27015/" target="_blank"><img src="http://cache.www.gametracker.com/server_info/8.6.15.53:27015/b_560_95_1.png" border="0" width="560" height="95" alt=""/></a>
atticusmas is offline
gameguysz
Member
Join Date: Aug 2011
Location: USA
Old 08-17-2011 , 15:47   Re: [TF2] VIP that works with mysql?
Reply With Quote #22

Quote:
Originally Posted by atticusmas View Post
i dont. how much?

I'm interested too
gameguysz is offline
snake4life
Member
Join Date: Jul 2011
Old 08-20-2011 , 06:10   Re: [TF2] VIP that works with mysql?
Reply With Quote #23

simply what I need is a code snippet that checks in table 'expire' the date and compare it with the current date and If its expired delete the steamid
my table looks like

steamid l expire

STEAM_0:0:123 l MM : DD : YY

is there anybody out how can help me
snake4life is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 08-20-2011 , 19:07   Re: [TF2] VIP that works with mysql?
Reply With Quote #24

Quote:
Originally Posted by snake4life View Post
simply what I need is a code snippet that checks in table 'expire' the date and compare it with the current date and If its expired delete the steamid
my table looks like

steamid l expire

STEAM_0:0:123 l MM : DD : YY

is there anybody out how can help me
Change your expire from a varchar/text or whatever it is to a date (YYYY-MM-DD), then use this code:

PHP Code:
mysql_query("DELETE FROM `table_name` WHERE expire < '".date('Y-m-d')."'"); 
__________________
Dr. McKay is offline
snake4life
Member
Join Date: Jul 2011
Old 08-21-2011 , 04:31   Re: [TF2] VIP that works with mysql?
Reply With Quote #25

Quote:
Originally Posted by Dr. McKay View Post
Change your expire from a varchar/text or whatever it is to a date (YYYY-MM-DD), then use this code:

PHP Code:
mysql_query("DELETE FROM `table_name` WHERE expire < '".date('Y-m-d')."'"); 
PHP Code:
<?php

require("connect.php");

mysql_query("DELETE FROM 'donations' WHERE expire < '".date('Y-m-d')."'");
echo 
"delete debug";

mysql_close($connect);
?>


did not work for me =( he deletes nothing any idear?

Last edited by snake4life; 08-21-2011 at 04:35.
snake4life is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 08-21-2011 , 14:12   Re: [TF2] VIP that works with mysql?
Reply With Quote #26

Quote:
Originally Posted by snake4life View Post
PHP Code:
<?php

require("connect.php");

mysql_query("DELETE FROM 'donations' WHERE expire < '".date('Y-m-d')."'");
echo 
"delete debug";

mysql_close($connect);
?>


did not work for me =( he deletes nothing any idear?
I told you, you need to change the column `expire` from whatever it is to a DATE type. and when you add any rows, `expire` will need to be in the format YYYY-MM-DD (that'd be date('Y-m-d')).
__________________
Dr. McKay is offline
snake4life
Member
Join Date: Jul 2011
Old 08-22-2011 , 04:54   Re: [TF2] VIP that works with mysql?
Reply With Quote #27

Quote:
Originally Posted by Dr. McKay View Post
I told you, you need to change the column `expire` from whatever it is to a DATE type. and when you add any rows, `expire` will need to be in the format YYYY-MM-DD (that'd be date('Y-m-d')).
thats weird its still not working

snake4life is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 08-22-2011 , 09:56   Re: [TF2] VIP that works with mysql?
Reply With Quote #28

Ah, your problem is that you used single quotes around your table name. They have to be the special quotes, the ones you get by hitting the tilde (~) key without holding Shift (`). That should fix your problem.
__________________
Dr. McKay is offline
snake4life
Member
Join Date: Jul 2011
Old 08-22-2011 , 18:49   Re: [TF2] VIP that works with mysql?
Reply With Quote #29

Quote:
Originally Posted by Dr. McKay View Post
Ah, your problem is that you used single quotes around your table name. They have to be the special quotes, the ones you get by hitting the tilde (~) key without holding Shift (`). That should fix your problem.
ohh damn, sure!!!!

god bless u its working =DDD
thanks u very much!
snake4life 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 03:41.


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