FBSQL_NEXT_RESULT(3) 1 FBSQL_NEXT_RESULT(3)fbsql_next_result - Move the internal result pointer to the next resultSYNOPSIS
bool fbsql_next_result (resource $result)
DESCRIPTION
When sending more than one SQL statement to the server or executing a stored procedure with multiple results will cause the server to
return multiple result sets. This function will test for additional results available form the server. If an additional result set exists
it will free the existing result set and prepare to fetch the words from the new result set.
PARAMETERS
o $
result -A result identifier returned by fbsql_query(3) or fbsql_db_query(3).
RETURN VALUES
Returns TRUE if an additional result set was available or FALSE otherwise.
EXAMPLES
Example #1
fbsql_next_result(3) example
<?php
$link = fbsql_connect("localhost", "_SYSTEM", "secret");
fbsql_select_db("MyDB", $link);
$SQL = "Select * from table1; select * from table2;";
$rs = fbsql_query($SQL, $link);
do {
while ($row = fbsql_fetch_row($rs)) {
}
} while (fbsql_next_result($rs));
fbsql_free_result($rs);
fbsql_close($link);
?>
PHP Documentation Group FBSQL_NEXT_RESULT(3)
Check Out this Related Man Page
FBSQL_NUM_ROWS(3) 1 FBSQL_NUM_ROWS(3)fbsql_num_rows - Get number of rows in resultSYNOPSIS
int fbsql_num_rows (resource $result)
DESCRIPTION
Gets the number of rows in the given $result set.
This function is only valid for SELECT statements. To retrieve the number of rows returned from a INSERT, UPDATE or DELETE query, use
fbsql_affected_rows(3).
PARAMETERS
o $
result -A result identifier returned by fbsql_query(3) or fbsql_db_query(3).
RETURN VALUES
Returns the number of rows returned by the last SELECT statement.
EXAMPLES
Example #1
fbsql_num_rows(3) example
<?php
$link = fbsql_connect("localhost", "username", "password");
fbsql_select_db("database", $link);
$result = fbsql_query("SELECT * FROM table1;", $link);
$num_rows = fbsql_num_rows($result);
echo "$num_rows Rows
";
?>
SEE ALSO fbsql_affected_rows(3), fbsql_connect(3), fbsql_select_db(3), fbsql_query(3).
PHP Documentation Group FBSQL_NUM_ROWS(3)
I have a file where each line is a stream of text as follows,
table1, select * from table1
table2, select * from table2
How do i loop through the file line by line? I have tried doing the following
for line in `cat file.txt`
do
echo $line
done
and ...
cat file.txt|while read line... (2 Replies)
Hello all
Im trying to write one liner that will show me results only if the result of the expression is greater then 0
For example:
I do :
find . -name "*.dsp" | xargs grep -c SecurityHandler
the result are :
./foo/blah/a.dsp:0
./foo/blah1/b.dsp:1
./foo/blah2/c.dsp:2... (1 Reply)
Hi,
I have a abc.txt file.
In this file there is a SQL query which Iwant to copy and print it on another file.The query (for eg) is written like this:
SELECT field1,
field2,
field3
from table1,table2
where <conditions>
END
I want to copy this query to another... (3 Replies)
Hi Friends...
Please assist me to assign the result of a SQL query that results two column, to two variables.
Pls find the below code that I write for assigning one column to one variable. and please correct if anything wrong..
#! /bin/sh
no='
sqlplus -s uname/password@DBname... (4 Replies)
Hi,
I need your help in sedning sql queries output to different excel sheets.
My requirement is like this:
Query1: Select name from table1 where status = 'Complete'
Query2: Select name from table1 where status = 'Failed'
Query3: Select name from table1 where status = 'Ignored'
... (4 Replies)
Hi All,
I want to format the result driven from the query into neat format.
For example pls find the below code,
#! /bin/sh
result='
sqlplus -s uname/passwrd@DBname
select no,name,address,ph_no, passport_no,salary,designation
from emp_table where salary>1000;
exit
EOF'
... (8 Replies)
I want to send email for every row comes out of following SQL statement
thank you for your help.
*****SQL STATEMENT******
Select SCUSER AS "USER IDS" , SCEUSER AS "LOCKED OUT" FROM SYS.7333.F98OWSEC;
*******OUPUT COMES LIKE THIS AND ONE EMAIL COMES AS PER SCRIPT BELOW******
******BUT... (4 Replies)
Hi,
I need to compare two files and produce a report.
As you can see the files contain the table name and count. The outfile should include mismatch counts and unmatched tables.
please can someone help with this.
Thanks (2 Replies)
Hi friends,
i have a file which contains all words(including comma) in different line.
for example:
more file.txt
select
column1
from
table1
,
table2
join
table3
0n
condition
i just want to get table2 if there is a comma after table1(as shown in the above case) else dont fetch... (4 Replies)
Hi All,
We all designers are fearful into a firm spot in developing a time management and statistic/reporting web application/system. Because of our server I cannot work with SQL. I have to create this PHP application in Adobe Dreamweaver from scrape *eek* I am not very experienced person... (1 Reply)
I just wish to extract the result onli... but I dont which edit to perform to start from (**) :wall:
Current display result
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Sep 24 14:14:49 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g... (4 Replies)
I have a function that outputs 3 lines for each result and I want to know how many results there are.
so for example
function | wc -l
24
but I want to see the result 8.
so is there a easy way to divide the result? (5 Replies)