I have a shell script, which connects to the database and runs .sql file.
after executing of .sql file, i need to store the results in error table.
How can i achieve this one? could you please give your suggestions.
here is my code.
Thanks,
Rami Reddy
I try to get the month (of last save) and the filename into a variable, is this possible ?
something like this :
for month in `ls -la | awk '{print $6}'`
do
if ]
then
a=filename of the matching file
cp $a /Sep
fi
thanks,
Steffen (1 Reply)
I have the results of a grep with -n store in a shell variable
ie
VAR=`grep -n -e 'PATTERN' file`
How ever I am missing the line breaks in the variable , How do I store the resualts of grep with many lines in to a variables. I want the varable should be the sawmway as we do the grep
grep... (3 Replies)
Hi all. I'm a real unix newbie and looking for some help on a shell scripting problem. I'm going the longest ways around everything but I'm getting there.
My next problem however has me stumped.
I have set up a program that takes inputs from a user for a particular month and year (and stores them... (2 Replies)
Hello Guys...
I want a small help from you guys.
Actually in Oracle, we are having a utlity called spool through which can store whatever SQL statements executed and other queries and the output of those queries in a file
So, similarly in Unix, if I start a session executing a number of Unix... (2 Replies)
Hi Perl Gurus , need URGENT HELP PLEASE !!!!!
I have one recursive Perl function which takes path of any directory as argument and returns array containing all the sub folders inside it recursively.
Now the problem is that it works well if i use it with one time but the problem is that when... (0 Replies)
hi everybody,
Asking for something that I´m not sure if it´s possible to implement. I hope be clear enough.
Well, my issue is that I´m looking how to copy or extract a particular table content of a website. I get the content from a external feed (Iframe format), the content is updated every... (1 Reply)
Hi,
I have few variable say 10
ex:-
l_pc_291334_01_0_01_00.cmp
l_pc_441133_50_0_02_00.cmp
l_pc_441133_55_0_02_00.cmp
Each variable value is coming via loop on a table.
I want to create a script that stores these value to a table or array ( But one by one not all at one time as... (4 Replies)
Hi,
I want to store the results of running ls in a directory on a remote host using ftp.
For example,
#!/usr/bin/ksh
ftp -n hostx <<EOF
user username password
ls /tmp/RandomFiles.*
#I need to put the results of that ls command into some file, so I can get the last file in... (3 Replies)
Hi,
I have a script where I make a sqlplus connection. In the script I have multiple sql queries within that sqlplus connection. I want the result of the queries to be stored in shell variables declared earlier. I dont want to use procedures. Is there anyway else.
Thanks in advance..
Cheers (6 Replies)
Hi,
When I use scp to copy a file from other location, I get the output like filename, time taken etc on console. I want to store that into a database table (in oracle).
Could someone give me some pointers on how to achieve this?
Regards,
Sachin Vaidya (1 Reply)
Discussion started by: notthatsachin
1 Replies
LEARN ABOUT PHP
mysql_create_db
MYSQL_CREATE_DB(3) 1 MYSQL_CREATE_DB(3)mysql_create_db - Create a MySQL databaseSYNOPSIS
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)