The Phantom Posted December 12, 2012 Share Posted December 12, 2012 Okay in my sql database I do this DELETE FROM `users` WHERE 1`donated` and I get #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`donated`' at line 1 someone help am I doing it wrong? Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted December 12, 2012 Share Posted December 12, 2012 Like this: DELETE FROM `users` WHERE `donated` > 0 Your not being very specific Quote Link to comment Share on other sites More sharing options...
The Phantom Posted December 14, 2012 Author Share Posted December 14, 2012 Sorry Kyle, I get this and it doesn't delete it? 0 rows deleted. ( Query took 0.0003 sec ) Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted December 14, 2012 Share Posted December 14, 2012 Then nothing meets that argument. What are you actually trying to do? Your SQL you posted is not a valid argument thats why you got an error. Here is what you need to do: 1. Give SQL an action so in this case its DELETE 2. Tell it what table to delete from so FROM users 3. Now tell it what to delete with a where parameter WHERE donated 4. What in the column called "donated" are you looking for? Examples: = or > or < or != Just to name a few. Quote Link to comment Share on other sites More sharing options...
The Phantom Posted December 14, 2012 Author Share Posted December 14, 2012 I'm not stupid. Kyle I tried your method I think I did something wrong I delete whole users LOLOLOL, But luckily no one is playing my game at the moment so I didn't mind at all. I now delete donate. Another method, Go on structure and click drop the one you want to drop. Thanks kyle. Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted December 14, 2012 Share Posted December 14, 2012 With SQL you have to be specific with what you want to do or one of 2 things will happen. 1. You get luck and get an error or 2. You better start that table over. If you tell us what you are trying to delete we can assist you better Quote Link to comment Share on other sites More sharing options...
lucky3809 Posted December 15, 2012 Share Posted December 15, 2012 More info is needed as Kyle stated... When I look at it, it looks like your trying to delete when donator days equal 1 day. Or delete from userid 1. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.