you can create file.txt automatically by running another mysql command against the kontack_group table on the start of the script ... then $message2 can also be added into another mysql table and correlated with the sms_keyword so you can grap them automatically from your script ...
Hi,
I was going through a file containing hundreds of lines of codes having conditional statement written as:
log()
{
echo $@
}
num=$(/usr/bin/rsh <one_machine> -l root 'ls -d /home/user/db* 2> /dev/null' | wc -w)
(( num > 0 )) && log "db info:"
so,if here the return value(stored in... (2 Replies)
I am learning Unix for the first time. I am playing around with my default profile file to add some script in the KSH. The time format is GMT and I am in eastern time zone. I am trying to script some greetings based upon the time of day using the IF/ELIF conditions. I am getting errors. I have... (2 Replies)
Below is my shell script. I am trying to execute two different BTEQ scripts depending on the day of the week. So on a saturday I will execute a certain BTEQ script and on other weekdays I will run the other script.
#!/bin/ksh
dt=`date +"%a"`
if then
bteq > final_output <<- EOF
.run... (3 Replies)
I have a unix shell script Test.sh
more Test.sh
echo "Calling dbquery1.sh...."
./dbquery1.sh
echo "Calling dbquery2.sh...."
./dbquery2.sh
more dbquery1.sh
sqlplus -s user1/password1@DB_SID @/tmp/storedprocedures/Hello.rcp
I run Test.sh
However, I do not want dbquery2.sh to be... (3 Replies)
Hello.
I am new this site as well as new to shell scripting and this is my first form... Please help me with the following shell script.
I am executing a shell script to run every 15 min (scheduled in cronjob) and it gives an output in an output file which is e-mailed.
CONCCOUNT=`cat... (1 Reply)
Hi,
I have a script file which has some simple commands. I want these commands to be executed based on the input. Ia m good with IF statement also. At the end it has to be based on incoming value. Example
CASE 1 :
Execute some commands where Input value as 1
CASE 2 :
Execute... (5 Replies)
Hello,
I am running under ubuntu14.04 with php5. When I run below php, it creates a token, then adds axaxax and bxbxbx into pc database, and at last, kills created token.
What I am trying to do is to add userid and password read from a file. I do not wish to enter username and password manually.... (3 Replies)
Discussion started by: baris35
3 Replies
LEARN ABOUT DEBIAN
cgi::session::driver::mysql
CGI::Session::Driver::mysql(3pm) User Contributed Perl Documentation CGI::Session::Driver::mysql(3pm)NAME
CGI::Session::Driver::mysql - CGI::Session driver for MySQL database
SYNOPSIS
$s = CGI::Session->new( 'driver:mysql', $sid);
$s = CGI::Session->new( 'driver:mysql', $sid, { DataSource => 'dbi:mysql:test',
User => 'sherzodr',
Password => 'hello' });
$s = CGI::Session->new( 'driver:mysql', $sid, { Handle => $dbh } );
DESCRIPTION
mysql stores session records in a MySQL table. For details see CGI::Session::Driver::DBI, its parent class.
It's especially important for the MySQL driver that the session ID column be defined as a primary key, or at least "unique", like this:
CREATE TABLE sessions (
id CHAR(32) NOT NULL PRIMARY KEY,
a_session TEXT NOT NULL
);
To use different column names, change the 'create table' statement, and then simply do this:
$s = CGI::Session->new('driver:mysql', undef,
{
TableName=>'session',
IdColName=>'my_id',
DataColName=>'my_data',
DataSource=>'dbi:mysql:project',
});
or
$s = CGI::Session->new('driver:mysql', undef,
{
TableName=>'session',
IdColName=>'my_id',
DataColName=>'my_data',
Handle=>$dbh,
});
DRIVER ARGUMENTS
mysql driver supports all the arguments documented in CGI::Session::Driver::DBI. In addition, DataSource argument can optionally leave
leading "dbi:mysql:" string out:
$s = CGI::Session->new( 'driver:mysql', $sid, {DataSource=>'shopping_cart'});
# is the same as:
$s = CGI::Session->new( 'driver:mysql', $sid, {DataSource=>'dbi:mysql:shopping_cart'});
BACKWARDS COMPATIBILITY
As of V 4.30, the global variable $CGI::Session::MySQL::TABLE_NAME cannot be used to set the session table's name.
This is due to changes in CGI::Session::Driver's new() method, which now allows the table's name to be changed (as well as allowing both
the 'id' column name and the 'a_session' column name to be changed).
See the documentation for CGI::Session::Driver::DBI for details.
In particular, the new syntax for "new()" applies to all database drivers, whereas the old - and bad - global variable method only applied
to MySQL.
Alternately, call $session -> table_name('new_name') just after creating the session object if you wish to change the session table's name.
LICENSING
For support and licensing see CGI::Session.
perl v5.12.4 2011-07-08 CGI::Session::Driver::mysql(3pm)