SQL

I have a working understanding of Big Data, Data Analytics, Regression Analysis, Association Analysis, PowerBI, RapidMiner, R, Tableu and microsoft MySql server. I understand how to work with tables, execute joins, subqueries, aggregate functions, and all of the basic SQL key words.

 

Here is an example of code that i wrote to create SQL tables.

 

//——————————-MySql section—————————

// Objective 3
// create table
/*

CREATE TABLE IF NOT EXISTS servers (
id INT(11) DEFAULT NULL,
serverid VARCHAR(45) DEFAULT NULL,
servername VARCHAR(45) DEFAULT NULL,
clientid INT(11) DEFAULT NULL,
datacenter VARCHAR(200) DEFAULT NULL,
ipaddress VARCHAR(200) DEFAULT NULL,
serverdescription VARCHAR(250) DEFAULT NULL,
PRIMARY KEY (id)
)

//Establish connection
$con = mysql_connect(“daniel”,”am&d93%43″,””) or die(‘Could not connect: ‘ . mysql_error());
mysql_select_db(“servers”, $con);
//insert into mysql table
foreach ($Server_array as $server)
{
$sql = “INSERT INTO servers(id, serverid, servername, clientid, datacenter, ipaddress, serverdescription )
VALUES(‘$server[“id”]’, ‘$server[“server_id”]’, ‘$server[“server_name”]’,’$server[“client_id”]’,’$server[“datacenter_id”]’,’$server[“ip_address”]’,’$server[“server_description”]’)”;
if(!mysql_query($sql,$con))
{
die(‘Error : ‘ . mysql_error());
}
}

*/
?>
</p>
</body>
</html>

 

 

css.php