0

I am trying to create a new db called testDB2, below is my code. Once running the script all I am getting an error on line 7

Fatal error: Call to undefined function mysqlquery() in /home/admin/domains/domain.com.au/public_html/db_createdb.php on line 7

This is my code

<?
$sql = "CREATE database testDB2";

$connection = mysql_connect("localhost", "admin_user", "pass")
    or die(mysql_error());

$result = mysqlquery($sql, $connection) 
    or die(mysql_error());

if ($result) {
    $msg = "<p>Databse has been created!</p>";
}
?>

<HTML>
<head>
<title>Create MySQL database</title>
</head>
<body>

<? echo "$msg"; ?>

</body>
</HTML>

UPDATE, now I get error

Access denied for user 'admin_user'@'localhost' to database 'testDB2'

what does this mean?

1 Answer 1

2

The function is called mysql_query. Note the _

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.