<?php


//srep1

$servername="localhost";
$username="root";
$password="";
$dbname="aidb";
$conn = new mysqli($servername, $username, $password, $dbname);
if($conn->connect_error){
    die("Connection failed: " . $conn->connect_error);
}
else{
    echo "connection successful";
}

//step2 "creeate database"
/*
$db="CREATE DATABASE aidb";  //QUERY
if($conn->query($db) === TRUE){
    echo "Database created successfuYly";
}
else{
    echo "Error 404";
    }
*/

//step3 "create table"
//users - prediciions - recommendations -anomaliws
/*      
$users="CREATE TABLE  users( 
    id INT(11) AUTO_INCREMENT PRIMARY KEY,
    username VARCHAR(255) NOT NULL,
    email VARCHAR(255) NOT NULL,
    password VARCHAR(255) NOT NULL,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
)";
if($conn->query($users) === TRUE){
    echo "Table created successfully";
}
else{
    echo "Error 404"; 
}    
    
*/ 