K e o u g h Posted July 23, 2014 Group: Members Topic Count: 96 Topics Per Day: 0.02 Content Count: 260 Reputation: 181 Joined: 12/06/11 Last Seen: December 7, 2024 Share Posted July 23, 2014 Hello, as the title says, how can i truncate a table like picklog in script command? like query_sql? its like making a menu in NPC like: "Reset Picklog" "Reset Zenylog" if click the picklog the whole picklog table will reset or truncate. anyone can help me please? thank you in advance! Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 23, 2014 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted July 23, 2014 prontera,150,150,5 script jopijip 75,{ setarray .@table$, "zenylog", "picklog"; .@s = select( "truncate zenylog", "truncate picklog" ) -1; query_logsql "truncate table `"+ .@table$[.@s] +"`"; mes "you truncate table "+ .@table$[.@s]; close; } Quote Link to comment Share on other sites More sharing options...
K e o u g h Posted July 24, 2014 Group: Members Topic Count: 96 Topics Per Day: 0.02 Content Count: 260 Reputation: 181 Joined: 12/06/11 Last Seen: December 7, 2024 Author Share Posted July 24, 2014 @capuche THANK YOU VERY MUCH! Quote Link to comment Share on other sites More sharing options...
Erba Posted July 26, 2014 Group: Members Topic Count: 84 Topics Per Day: 0.02 Content Count: 550 Reputation: 9 Joined: 11/06/12 Last Seen: August 14, 2014 Share Posted July 26, 2014 how about deleting 1 column only? Quote Link to comment Share on other sites More sharing options...
nanakiwurtz Posted July 26, 2014 Group: Members Topic Count: 81 Topics Per Day: 0.02 Content Count: 1654 Reputation: 583 Joined: 08/09/12 Last Seen: January 14, 2020 Share Posted July 26, 2014 alter table drop column x; Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 26, 2014 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted July 26, 2014 alter table drop column x; I think he wants to delete the value in 1 column lol Use update sql command and set the default value (google please) Quote Link to comment Share on other sites More sharing options...
Erba Posted July 26, 2014 Group: Members Topic Count: 84 Topics Per Day: 0.02 Content Count: 550 Reputation: 9 Joined: 11/06/12 Last Seen: August 14, 2014 Share Posted July 26, 2014 hihi sorry sir|! Quote Link to comment Share on other sites More sharing options...
Question
K e o u g h
Hello, as the title says, how can i truncate a table like picklog in script command? like query_sql?
its like making a menu in NPC like:
"Reset Picklog"
"Reset Zenylog"
if click the picklog the whole picklog table will reset or truncate.
anyone can help me please? thank you in advance!
Link to comment
Share on other sites
6 answers to this question
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.