KyleBarsby
Member
- Jan 10, 2012
- 34
- 2
PHP:
<?php
mysql_query( "CREATE TABLE IF NOT EXISTS lottery_stats ( `current_balance` int(250) NOT NULL, `last_week_balance` int(250) NOT NULL, `last_winner` varchar(250) NOT NULL, `rollover` varchar(250) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;" );
mysql_query( "CREATE TABLE IF NOT EXISTS lottery ( `id` int(250) NOT NULL, `username` varchar(250) NOT NULL, `num` int(250) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;" );
mysql_query( "INSERT INTO lottery_stats ( `current_balance`, `last_week_balance`, `last_winner`, `rollover` ) VALUES ( 0, 0, 'null', 'true' )" ;
?>
I want it so when tables have been created and it inserts the stats row i don't want it to keep reinserting it, but don't want to remove it at the same time because it's a CMS addon, thanks