Jump to content
  • 0

how to delete this on sql?


PewN

Question


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

how can i delete the pvpladder on sql query?

cuz i got a problem here. :( help

DELETE FROM `pvpladder` WHERE `char_id`,`name`,`streaks`,`kills`,`deaths`,`streaktime`

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  117
  • Reputation:   18
  • Joined:  01/06/12
  • Last Seen:  

Not sure what you want but if you want to delete table entirely then it should be

DROP TABLE `pvpladder`

or if you want to only empty the table then it should be

 TRUNCATE TABLE `pvpladder` 

That code you provide only delete an entry and is wrongly formatted as it suppose to have conditional entry after WHERE

which should be for example

DELETE FROM `pvpladder` WHERE `char_id` = 123456

which will delete all entries from `pvpladder` with `char_id` equal to 123456.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  292
  • Reputation:   17
  • Joined:  12/12/11
  • Last Seen:  

It depends on how you are saving the values in your ladder..

if the values saves when the player logouts, you need to do the deleting when all players are not online. :)

You can use the @maintenance command if you have it then do a drop table and create table again.. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...