Jump to content
  • 0

How can i add this to my database?


Question

Posted

Hello, in the script " Coupon NPC 1.1.2" , there is a requirement that i should add "coupons" to my database but i dont know how.

Below of the script , it contains this but i dont know how to add it into SQL.

OnInit:

query_sql "CREATE TABLE IF NOT EXISTS `coupons` (`code` TINYTEXT NOT NULL, `item_id` INT NOT NULL, `item_amount` INT NOT NULL, INDEX `code` (`code`(32)) ) ENGINE=MyISAM";

}

2 answers to this question

Recommended Posts

Posted

OnInit label will be trigger when the server startup / reloaded .....

and the contents inside the OnInit label will be executed..

in your case...the table is auto generated by the code inside the OnInit label...

so you dont need to execute any things ... everything is done automatically.

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