} //Create Table if none exists $query = "CREATE TABLE `comments`\n\t\t(`userid` int NOT NULL,\n\t\t`photoid` int NOT NULL,\n\t\t`text` text NOT NULL,\n\t\t`dateOfCreation` text NOT NULL\n\t\t) ENGINE=MyISAM;"; if ($mysqli->query($query)) { echo "comments photos created successfully\n"; echo "<br>"; echo "<br>"; } else { echo 'Query failed: ' . $mysqli->error; echo "<br>"; echo "<br>"; } //Create Table if none exists $query = "CREATE TABLE `likes`\n\t\t(`userid` int NOT NULL,\n\t\t`photoid` int NOT NULL,\n\t\t`text` text NOT NULL,\n\t\t`dateOfCreation` text NOT NULL\n\t\t) ENGINE=MyISAM;"; if ($mysqli->query($query)) { echo "likes created successfully\n"; echo "<br>"; echo "<br>"; } else { echo 'Query failed: ' . $mysqli->error; echo "<br>"; echo "<br>"; } } } $model = new APIModel(); $return = $model->printName("Joe"); echo "{$return}"; echo "<br>"; echo "<br>"; $model->createTables();