Jump to content

Dark Theme was set as default for all members. Please report any issues here.

  • 0
Sign in to follow this  
hadiesyafiq

How to create new SQL TABLE for script

Question

i have script but i lost the SQL Table

can someone teach me how to create new one for the script...

here some query sql on the script

query_sql( "SELECT `id` FROM `e_freebie` WHERE `aid` = "[email protected]+" LIMIT 1", [email protected] );

query_sql( "INSERT INTO `e_freebie` ( `aid` ) VALUES ( "[email protected]+" )" );

query_sql( "SELECT COUNT(`id`) FROM `e_freebie` WHERE `status` = 2",[email protected]_id );

query_sql( "SELECT `id`, `time` FROM `e_freebie` WHERE `status` = 1 AND `aid` = "+ [email protected], [email protected], [email protected]$ );

query_sql( "UPDATE `e_freebie` SET `status` = 2, `time` = NOW() WHERE `id` = "[email protected]+" LIMIT 1" );
 

Edited by hadiesyafiq

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0
10 hours ago, hadiesyafiq said:

i have script but i lost the SQL Table

can someone teach me how to create new one for the script...

here some query sql on the script

query_sql( "SELECT `id` FROM `e_freebie` WHERE `aid` = "[email protected]+" LIMIT 1", [email protected] );

query_sql( "INSERT INTO `e_freebie` ( `aid` ) VALUES ( "[email protected]+" )" );

query_sql( "SELECT COUNT(`id`) FROM `e_freebie` WHERE `status` = 2",[email protected]_id );

query_sql( "SELECT `id`, `time` FROM `e_freebie` WHERE `status` = 1 AND `aid` = "+ [email protected], [email protected], [email protected]$ );

query_sql( "UPDATE `e_freebie` SET `status` = 2, `time` = NOW() WHERE `id` = "[email protected]+" LIMIT 1" );
 

CREATE TABLE IF NOT EXISTS `e_freebie` (
    `id` int(11) unsigned NOT NULL auto_increment,
    `aid` int(11) unsigned NOT NULL default '0',
    `status` int(11) unsigned NOT NULL default '0',
    `time` datetime NOT NULL,
) ENGINE=MyISAM;

Share this post


Link to post
Share on other sites
  • 0
22 hours ago, Chatterboy said:

CREATE TABLE IF NOT EXISTS `e_freebie` (
    `id` int(11) unsigned NOT NULL auto_increment,
    `aid` int(11) unsigned NOT NULL default '0',
    `status` int(11) unsigned NOT NULL default '0',
    `time` datetime NOT NULL,
) ENGINE=MyISAM;

Thank you very much sir

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.