Jump to content
  • 0

how to delete this on sql?


Question

Posted

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`

2 answers to this question

Recommended Posts

Posted

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.

Posted

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.. :)

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...