Hello
To do :
'automate the process of generating report and send it to client every 15 days after encrypting the report file'
Did so far :
- generate Java program to encrypt the file.
- generate SQL query to run the report.
Is there any body who can help me to go further ?
... (7 Replies)
Hi ,
I used the below script to get the sql data into csv file using unix scripting.
I m getting the output into an output file but the output file is not displayed in a separe columns .
#!/bin/ksh
export FILE_PATH=/maav/home/xyz/abc/
rm $FILE_PATH/sample.csv
sqlplus -s... (2 Replies)
i have a Oracle table like
col1 col2
---- -----
a 1
b 2
c 3
when i write a script for it , it gives me all the data in one column.
Please give me the solution which gives the exact result like we see in sql editors.
for a in `echo "
set feedback off;
set pagesize 40;... (1 Reply)
Hi ,
I have a sql query in the unix script ,whose output is shown below.I want to convert this output to HTML table format & send email from unix with this table as email body.
p_id src_system amount
1 A 100
2 B 200
3 C ... (3 Replies)
I am using Sun Solaris ver. 5.10 and trying to send an HTML table in email body using mail command in C shell script.
I tried following commands:-
#1
mail -m "MIME-Version: 1.0;Content-type:text/html;charset=UTF-8" receiver@mail.com < file.html #2
mail -m "Content-type: text/html;" -s "This... (4 Replies)
Hello All,
I have a query here. I am sending an HTML table(which I am creating it by a call to REST API, in a LINUX box) and from there I have to send it into an email. So following are the poins on same:
As data is not static so it is writing Dynamic data and creating HTML file.
There is... (9 Replies)
Below is the code snippet and I'm not able to generate the table in email, output email has nothing
if ; then
echo "File $fName exists."
awk -F "," ' BEGIN {
print "MIME-Version: 1.0"
print "Content-Type: text/html"
print "Subject: Out OF Network Fee - Portfolio Level Stats"
print... (1 Reply)
HI Team,
I am working on reading hive table and send email in email body using shell script, can you please help on fixing the errors: I have 6 columns in my hive table and trying to send the email in the mail body.
below script:
#!/bin/bash
hive -e 'SELECT count(*) from db.table' >... (4 Replies)
Discussion started by: Mi4304
4 Replies
LEARN ABOUT PHP
pdo.query
PDO.QUERY(3) 1 PDO.QUERY(3)PDO ::query - Executes an SQL statement, returning a result set as a PDOStatement object
SYNOPSIS
public PDOStatement PDO::query (string $statement)
DESCRIPTION
PDOStatement PDO::query (string $statement, int $PDO::FETCH_COLUMN, int $colno) PDOStatement PDO::query (string $statement, int
$PDO::FETCH_CLASS, string $classname, array $ctorargs) PDOStatement PDO::query (string $statement, int $PDO::FETCH_INTO, object
$object)
PDO.query(3) executes an SQL statement in a single function call, returning the result set (if any) returned by the statement as a
PDOStatement object.
For a query that you need to issue multiple times, you will realize better performance if you prepare a PDOStatement object using PDO.pre-
pare(3) and issue the statement with multiple calls to PDOStatement.execute(3).
If you do not fetch all of the data in a result set before issuing your next call to PDO.query(3), your call may fail. Call PDOState-
ment.closeCursor(3) to release the database resources associated with the PDOStatement object before issuing your next call to
PDO.query(3).
Note
Although this function is only documented as having a single parameter, you may pass additional arguments to this function. They
will be treated as though you called PDOStatement.setFetchMode(3) on the resultant statement object.
PARAMETERS
o $statement
- The SQL statement to prepare and execute. Data inside the query should be properly escaped.
RETURN VALUES PDO.query(3) returns a PDOStatement object, or FALSE on failure.
EXAMPLES
Example #1
Demonstrate PDO::query
A nice feature of PDO.query(3) is that it enables you to iterate over the rowset returned by a successfully executed SELECT state-
ment.
<?php
function getFruit($conn) {
$sql = 'SELECT name, color, calories FROM fruit ORDER BY name';
foreach ($conn->query($sql) as $row) {
print $row['name'] . " ";
print $row['color'] . " ";
print $row['calories'] . "
";
}
}
?>
The above example will output:
apple red 150
banana yellow 250
kiwi brown 75
lemon yellow 25
orange orange 300
pear green 150
watermelon pink 90
SEE ALSO PDO.exec(3), PDO.prepare(3), PDOStatement.execute(3).
PHP Documentation Group PDO.QUERY(3)