FBSQL_AFFECTED_ROWS(3) 1 FBSQL_AFFECTED_ROWS(3)fbsql_affected_rows - Get number of affected rows in previous FrontBase operationSYNOPSIS
int fbsql_affected_rows ([resource $link_identifier])
DESCRIPTION fbsql_affected_rows(3) returns the number of rows affected by the last INSERT, UPDATE or DELETE query associated with $link_identifier.
Note
If you are using transactions, you need to call fbsql_affected_rows(3) after your INSERT, UPDATE, or DELETE query, not after the
commit.
If the last query was a DELETE query with no WHERE clause, all of the records will have been deleted from the table but this function will
return zero.
Note
When using UPDATE, FrontBase will not update columns where the new value is the same as the old value. This creates the possibility
that fbsql_affected_rows(3) may not actually equal the number of rows matched, only the number of rows that were literally affected
by the query.
PARAMETERS
o $
link_identifier -A FrontBase link identifier returned by fbsql_connect(3) or fbsql_pconnect(3).If optional and not specified, the
function will try to find an open link to the FrontBase server and if no such link is found it will try to create one as if
fbsql_connect(3) was called with no arguments.
RETURN VALUES
If the last query failed, this function will return -1.
SEE ALSO fbsql_num_rows(3).
PHP Documentation Group FBSQL_AFFECTED_ROWS(3)
Check Out this Related Man Page
FBSQL_SELECT_DB(3) 1 FBSQL_SELECT_DB(3)fbsql_select_db - Select a FrontBase databaseSYNOPSIS
bool fbsql_select_db ([string $database_name], [resource $link_identifier])
DESCRIPTION
Sets the current active database on the given link identifier.
The client contacts FBExec to obtain the port number to use for the connection to the database. If the database name is a number the sys-
tem will use that as a port number and it will not ask FBExec for the port number. The FrontBase server can be stared as FRontBase
-FBExec=No -port=<port number> <database name>.
Every subsequent call to fbsql_query(3) will be made on the active database.
PARAMETERS
o $database_name
- The name of the database to be selected. If the database is protected with a database password, the you must call fbsql_data-
base_password(3) before selecting the database.
o $
link_identifier -A FrontBase link identifier returned by fbsql_connect(3) or fbsql_pconnect(3).If optional and not specified, the
function will try to find an open link to the FrontBase server and if no such link is found it will try to create one as if
fbsql_connect(3) was called with no arguments.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
SEE ALSO fbsql_connect(3), fbsql_pconnect(3), fbsql_database_password(3), fbsql_query(3).
PHP Documentation Group FBSQL_SELECT_DB(3)
Dears,
I have a list as follows,
2
4
8
If I want to find the difference between two consecutive rows. Then I have to store the specific rows in two variables and then find the difference. Could someone tell how this can be done.
Regards, (7 Replies)
Hi All,
My first thread to this sub-forum and first thread of this sub-forum :)
Here it is,
Am trying to delete duplicates from a table retaining just 1 duplicate value out of the duplicate records
for example : from n records of a table out of which x are duplicates, I want to remove x... (15 Replies)
I am trying to create a script to search for a string within a file, and if found, return the next two lines.
Example file:-
msj
mh
query
return this 1
return this 2
mjk
mhj
query
return this 3
return this 4
So the script would identify the string "query" and then return the lines... (10 Replies)
Hi Guys,,
I am having a unix script which is running the DB2 Insert command.
For the insert command, there were no records to be updated.
SQL0100W No row was found for FETCH, UPDATE or DELETE; or the result of a
query is an empty table. SQLSTATE=02000
+ + echo 1
STAGE_RC=1
+ ]
... (6 Replies)
Hi all,
I was wondering if anyone knew a good/safe way to update a single column in a table that could contain upto 8 million rows...
simple command like:
UPDATE set blah=foo where bar=XXX;
I will be running this on tables being written to and tables that have already been created.
... (3 Replies)
Hi,
Is there any way that mysql query reads the content from a text file which has data in the below format:
1,2,3,4,5
and selects matched data from another table.
ie I have a table named xyz which has same ids as in that file.
I want this query to get count of the ids from xyz file by... (6 Replies)
Hi,
Need to delete line prior to (INSERT/UPDATE/DELETE). In case ' available, then keep that. Pls refet below details.
Input
======================
l_s := ' INSERT INTO TEST'
l_P PD := ' UPDATE INTO TEST'
l_D := ' DELETE INTO TEST'
This is test
Output... (4 Replies)
Hi Unix Gurus,
I am a newb. I am creating a script which will use an input file. This input file can have 1 or more than 1 DML staments like INSERT/DELETE/UPDATE.
I have to execute these statements using my script but before execution of these DML statements, I need to check the count for... (17 Replies)
Hello friends,
I have a file which consists of many rows, I use a couple of commands to convert it so i can use in a database query for filtering. I need the first columns (msisdns) in a row, seperated with commas,
9855162267,4,5,2010-11-03 17:02:07.627
9594567938f,5,5,2010-11-02... (9 Replies)
Hi UNIX Gurus,
I want to grep the WHERE clause mentioned in the SQL like below or from all the complez queries having this kind of logic. Basic intention is to check the record count impacted by the SQL (mentioned below). I am using this SQL, grep its where clause and creating another SELECT... (18 Replies)
Hi,
I am trying to fetch some values from db and spooling the output to a file.
when i query the db for the values, i get the values in following format.
PC_1 wf_test1 Test
PC_2 wf_test2 Test
PC_3 wf_test3 Test
But my spool file was created in following format.
PC_1
wf_test1
Test... (20 Replies)
Dear community,
I have to do something too hard for me :rolleyes:. I hope you can help me.
This is an output coming from Oracle query, stored in a file called query.out, there are many rows, but I read them, one by one, using while/read/done. Assuming each row is contained into $line variable... (8 Replies)
I have two files
File1 and File2 will contains same number of fields.
The rows in File1 can be found anywhere in File2.
If any rows from File1 doesn't match to File2 then write those records to a File1 log file.
If any rows from File2 doesn't match to File1 then write those records to a File2... (6 Replies)
HI,
I am having scenario like to print multipule rows from output of database query
sample query i mentioned below
code=`db2 -x select code,values from dummy`
in the query output i am getting around 110 records with 2 columns.
sample output pasted below
code,value... (3 Replies)
awk 'NR==FNR{arr;next} $0 in arr' /tmp/Data_mismatch.sh /prd/HK/ACCTCARD_20160115.txt
edit by bakunin: seems that one CODE-tag got lost somewhere. i corrected that, but please check your posts more carefully. Thank you. (5 Replies)