-
Notifications
You must be signed in to change notification settings - Fork 0
/
createtables.php
24 lines (12 loc) · 1.02 KB
/
createtables.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
$mysql = mysqli_connect("localhost", "barcampb_dbuser", "bcb11w1k1", "barcampb_bcbcms");
mysqli_query($mysql, "CREATE TABLE IF NOT EXISTS `sch_generated_schedule` ( `timeslot` int(11) NOT NULL, `track` int(11) NOT NULL, `session` int(11) NOT NULL)");
mysqli_query($mysql, "CREATE TABLE IF NOT EXISTS `sch_props_store` ( `option_key` varchar(500) NOT NULL, `option_val` varchar(1000) NOT NULL, UNIQUE KEY `unique_key` (`option_key`))");
mysqli_query($mysql, "CREATE TABLE IF NOT EXISTS `sch_selected_sessions` ( `id` int(3) NOT NULL AUTO_INCREMENT, `post_id` int(10) NOT NULL, `author` varchar(40) NOT NULL, `post_title` varchar(1000) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `unique_post` (`post_id`))");
mysqli_query($mysql, "CREATE TABLE IF NOT EXISTS `sch_session_user_mapping` ( `session` int(11) NOT NULL, `user` int(11) NOT NULL, UNIQUE KEY `unique_mapping` (`session`,`user`))");
$result = mysqli_query($mysql, "show tables");
while ($row = mysqli_fetch_array($result))
{
echo "\n".$row[0];
}
?>