Raised This Month: $51 Target: $400
 12% 

Need help with MySQL statement


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 12-11-2007 , 14:33   Need help with MySQL statement
Reply With Quote #1

Basically the select statement within this:

Code:
DELETE FROM wc3_player_race WHERE player_id IN ( SELECT `player_id` FROM `wc3_player` WHERE ( DATE_SUB(CURDATE(), INTERVAL 10 DAY) > time ) )
will return rows... roughly 4000... But the delete statement will NEVER delete the data from wc3_player_race... I have NO idea why - anyone know how to make this work or another method to do it? I tried temporary tables as well (see comment here - there is also a DB dump if anyone wants to play with this)

TY!!!!!
Josh
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
slmclarengt
Veteran Member
Join Date: Jul 2004
Location: The Cookie Jar... or Pul
Old 12-12-2007 , 04:34   Re: Need help with MySQL statement
Reply With Quote #2

Quote:
Originally Posted by Geesu View Post
Basically the select statement within this:

Code:
DELETE FROM wc3_player_race WHERE player_id IN ( SELECT `player_id` FROM `wc3_player` WHERE ( DATE_SUB(CURDATE(), INTERVAL 10 DAY) > time ) )
will return rows... roughly 4000... But the delete statement will NEVER delete the data from wc3_player_race... I have NO idea why - anyone know how to make this work or another method to do it? I tried temporary tables as well (see comment here - there is also a DB dump if anyone wants to play with this)

TY!!!!!
Josh
It seems like it did this for me:
Code:
Deleted rows: 842 (Query took 0.1250 sec)
Slmclarengt
__________________
But we don’t beat the Reaper by living longer. We beat the Reaper by living well. -Dr. Randy Pausch, R.I.P.

Come play WC3:FT on BnD Clan Server! You know you want to: Connect to WC3:FT BnD - go ahead click me!
slmclarengt 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 18:39.


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