Hi,
Actually I have a file which consists data . for eg names.
Then I want my sql query to read this file and produce the output.
Currently I am using this
FOR EG : FILENAME is NAMES
for i in `cat NAMES`
{
sqlplus -s $CONNECTID << EOF
spool rooh
set heading off
select... (1 Reply)
Hi
I have around 100 users in sun server and have default home directory in /usr/home/<username>
I want to clean their home directory time to time to make free space on root, as users generate many output files during usage of application.
My idea is, generate a file with following command... (4 Replies)
Hi guys
I having som problem trying to use sed to get a file and insert inside another one. I'll try to explain better.
I have a base.txt and using sed(having a array variables) I'm chaging some strings inside this file and saving as base1.txt. until here okay.
Then, I have to get this... (4 Replies)
I run into a issue when I try to do sorting of the following with ascending order, one round of for looping seems not working, anyone knows how to use shell or perl?
$array = (5,0,3,2,7,9,8) (2 Replies)
Hello, where can I get usefull information on the use of looping with for , if and while with extensive examples.
Also use of variables in scripts (1 Reply)
Hi,
Now I have written a script which sorts the records in the file and splits them according to some condition.
Now, I need to modify the script so that it reads all the files one after the other and does the sorting & splitting.
Pls help me in reading all the files in a directory and... (8 Replies)
Hi evryone
i need a help .
i have a file xcv.the content is :
accelerate
i want a script which will run 1000 times in loop and changing the value to
accelerate to
acceler
in 1st loop and in 2nd loop it will be again
accelerate and so on . (6 Replies)
Hey guys, so I am trying to do a loop script that will go through each folder (no gui so just each domain has a folder) and grab out the databases being used on that domain. I know I would use
mysql -e "show databases where not 'information_schema';" once in each directory to pull the actual... (3 Replies)
My script will do:
while true
do
if ]; then
### here im mailing content of file.txt
fi
if ]; then
exit 0
fi
sleep 30m
done
If i add exit 1 after ### mail, script is getting stopped.
Can you please suggest, how to implement above requirement. Mine is Linux machine. (11 Replies)
Discussion started by: JSKOBS
11 Replies
LEARN ABOUT PHP
mysqli_ping
MYSQLI_PING(3) 1 MYSQLI_PING(3)mysqli::ping - Pings a server connection, or tries to reconnect if the connection has gone down
Object oriented style
SYNOPSIS
bool mysqli::ping (void )
DESCRIPTION
Procedural style
bool mysqli_ping (mysqli $link)
Checks whether the connection to the server is working. If it has gone down, and global option mysqli.reconnect is enabled an automatic
reconnection is attempted.
This function can be used by clients that remain idle for a long while, to check whether the server has closed the connection and recon-
nect if necessary.
PARAMETERS
o $
link -Procedural style only: A link identifier returned by mysqli_connect(3) or mysqli_init(3)RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
mysqli::ping example
Object oriented style
<?php
$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
/* check connection */
if ($mysqli->connect_errno) {
printf("Connect failed: %s
", $mysqli->connect_error);
exit();
}
/* check if server is alive */
if ($mysqli->ping()) {
printf ("Our connection is ok!
");
} else {
printf ("Error: %s
", $mysqli->error);
}
/* close connection */
$mysqli->close();
?>
Procedural style
<?php
$link = mysqli_connect("localhost", "my_user", "my_password", "world");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s
", mysqli_connect_error());
exit();
}
/* check if server is alive */
if (mysqli_ping($link)) {
printf ("Our connection is ok!
");
} else {
printf ("Error: %s
", mysqli_error($link));
}
/* close connection */
mysqli_close($link);
?>
The above examples will output:
Our connection is ok!
PHP Documentation Group MYSQLI_PING(3)