7 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi there,
I have a problem in my script,
I need to check whether file exists in remote server or not,
if the file exists, then stop copy
else copy the file to the server..
my code is something like this
while read $server
do
if ssh $server "cd $directory_name; if ; then echo "Error:... (2 Replies)
Discussion started by: beezy
2 Replies
2. Emergency UNIX and Linux Support
Hi,
I have two websites:
website1.com and website2.com
I didn't write either but have successfully moved all the files from website1.com to website2.com
I (thought) I installed all the correct php modules and website2 is mostly up and running. However, my boss found that when we go to a... (15 Replies)
Discussion started by: Astrocloud
15 Replies
3. Programming
Hello every one
i have question i want to build DATAbase using PHP as interface
i use shell to access to linux . i have in linux psql and SQLplus
i'll call all html files that has db tabels from shell directory.
what should to do before design php pages. can build the database sql design... (3 Replies)
Discussion started by: Scotch
3 Replies
4. AIX
Dear friends I am an AIX administrator but now I am taking DB2 trainings.. DB2 is interesteing but if I want to success well I have to givap administering AIX systems because to do both of them its really tiresome and needs lot of time.. So anybody please advice me if you were at my place what... (0 Replies)
Discussion started by: Vit0_Corleone
0 Replies
5. Solaris
Hello,
I need to install a Jboss AS 4.2 asap. But I dont want to use the GUI. I need to install a solaris 10 server with the minimal packages but I dont know how deep I should customize and select the packages.
You guys , how you decide to select a package installation level ? Each server's... (7 Replies)
Discussion started by: shadowfaxxxx
7 Replies
6. Shell Programming and Scripting
Dear friends,
:) I need your help again. This time I have written 2 scripts i.e. A.sh & B.sh and both of them takes “serial no” as input. Both the scripts are exactly same except one thing, both are pointing to different tables.
Now I want to write another script that will decide whether to... (4 Replies)
Discussion started by: anushree.a
4 Replies
7. UNIX for Dummies Questions & Answers
I've got an old laptop and i want to try unix on it, but i'm a unix newbie, so i don't know what i have to choose.
We're talking about a laptop with an intel 80C386SX-20 CPU in it, with 2 MB Ram and 40 MB harddisk. Not really powerfull specs.
Is it possible to install a unix version on it. Or... (8 Replies)
Discussion started by: rolfvandekrol
8 Replies
MYSQL_CREATE_DB(3) 1 MYSQL_CREATE_DB(3)
mysql_create_db - Create a MySQL database
SYNOPSIS
Warning
This function was deprecated in PHP 4.3.0, and will be removed in the future, along with the entirety of the original MySQL exten-
sion. Instead, the MySQLi or PDO_MySQL extension should be used. See also MySQL: choosing an API guide and related FAQ for more
information. Alternatives to this function include:
omysqli_query(3)
o PDO::query
bool mysql_create_db (string $database_name, [resource $link_identifier = NULL])
DESCRIPTION
mysql_create_db(3) attempts to create a new database on the server associated with the specified link identifier.
o $database_name
- The name of the database being created.
o $
link_identifier -The MySQL connection. If the link identifier is not specified, the last link opened by mysql_connect(3) is
assumed. If no such link is found, it will try to create one as if mysql_connect(3) was called with no arguments. If no connection
is found or established, an E_WARNING level error is generated.
Returns TRUE on success or FALSE on failure.
Example #1
mysql_create_db(3) alternative example
The function mysql_create_db(3) is deprecated. It is preferable to use mysql_query(3) to issue an sql CREATE DATABASE statement
instead.
<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
$sql = 'CREATE DATABASE my_db';
if (mysql_query($sql, $link)) {
echo "Database my_db created successfully
";
} else {
echo 'Error creating database: ' . mysql_error() . "
";
}
?>
The above example will output something similar to:
Database my_db created successfully
Note
For backward compatibility, the following deprecated alias may be used: mysql_createdb(3)
Note
This function will not be available if the MySQL extension was built against a MySQL 4.x client library.
mysql_query(3), mysql_select_db(3).
PHP Documentation Group MYSQL_CREATE_DB(3)