Switch to: V11V10V9V8V7V6V5

valentina_create_db()

Declaration

bool valentina_create_db ( 
            string database_name,
            [resource link_identifier] )

Parameters

Name Description
database_name The name of the database being created.
link_identifier The Valentina Server connection. If the link identifier is not specified, the last link opened by valentina_connect() is assumed. If by chance no connection is found, an E_WARNING level warning is generated.

Description

Attempts to create a new database on the server associated with the specified link identifier.

Return Values

Returns TRUE on success or FALSE on failure.

Examples

Example

<?php
$link = valentina_connect('localhost', 'val_user', 'val_password');
if (!$link) {
   die('Could not connect: ' . valentina_error());
}
$name = my_db;
if( valentina_create_db($name) === TRUE ) {
  printf("Database %s created successfully", $name);
}
?> 

The above example will output something similar to:

Database my_db created successfully

See Also