Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted by k ( 18 years ago )
<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
if (mysql_query("CREATE DATABASE db7",$con))
{
echo "Database created";
}
else
{
echo "Error creating database: " . mysql_error();
}
mysql_select_db("db7", $con);
$sql = "CREATE TABLE cilveki
(
id int,
Vards varchar(15),
Uzvards varchar(15),
PersonasKods int,
Nodala varchar(3)
)";
mysql_query($sql,$con);
mysql_select_db("db7", $con);
mysql_query("INSERT INTO cilveki (id, Vards, Uzvards, PersonasKods, Nodala)
VALUES ('1', 'Kaspars', 'Ginters', '26058712314', 'ITb')");
mysql_query("INSERT INTO cilveki (id, Vards, Uzvards, PersonasKods, Nodala)
VALUES ('2', 'Janis', 'Cans', '20038712319', 'ITk')");
mysql_query("INSERT INTO cilveki (id, Vards, Uzvards, PersonasKods, Nodala)
VALUES ('3', 'Elina', 'Neimane', '16088812324', 'KSA')");
mysql_close($con);
?>
Revise this Paste