Dear elixir sinary,
I'm experiencing problem
As you can see the latest value is not shown, this because most probably it miss the ';' at the end.
This works:
I can simply add manually the ; but do you have any other idea?
Hi
I want to extract certain text between two line numbers like
23234234324 and
54446655567567
How do I do this with a simple sed or awk command?
Thank you.
---------- Post updated at 06:16 PM ---------- Previous update was at 05:55 PM ----------
found it:
sed -n '#1,#2p'... (1 Reply)
I regularly extract lines of text from files based on the presence of a particular keyword; I place the extracted lines into another text file. This takes about 2 hours to complete using the "sort" command then Kate's find & highlight facility.
I've been reading the forum & googling and can find... (4 Replies)
I have a text wich looks like this:
clid=2 cid=6 client_database_id=35 client_nickname=Peter client_type=0|clid=3 cid=22 client_database_id=57 client_nickname=Paul client_type=0|clid=5 cid=22 client_database_id=7 client_nickname=Mary client_type=0|clid=6 cid=22 client_database_id=6... (3 Replies)
I'm trying to take the output of an environment that has multiple strings
ex.
# echo $SSH_CLIENT
192.168.1.1 57039 22
I need that IP... so I can set it to another environment.
Thank you (3 Replies)
Hi Everyone,
#!/usr/bin/perl
use strict;
use warnings;
my @test=("a;b;qqq;c;d","a;b;ggg;c;d","a;b;qqq;c;d");
would like to split the @test array into two array:
@test1=(("a;b;qqq;c;d","a;b;qqq;c;d"); and @test2=("a;b;ggg;c;d");
means search for 3rd filed.
Thanks
find the... (0 Replies)
Hi,
I have a No Delimiter variable length text file with following schema -
Column Name Data length
Firstname 5
Lastname 5
age 3
phoneno1 10
phoneno2 10
phoneno3 10
sample data - ... (16 Replies)
I have a text file that has many lines, and for each line I need to extract different sections of text, then write several variables from the data.
I can split out the various sections by selecting their position on each line as the column sizes will never vary.
A sample of my text file is below... (2 Replies)
Hi
This is my first post and I'm just a beginner. So please be nice to me.
I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource.dat" is present on every 241st line. How do I extract this to a new text file?
I have tried sed -n 241,241p... (13 Replies)
This is part of a larger script where I need to pass only 1 line of a file to the script, based on a variable and not a direct reference.
As part of a for loop :
# for((line=0;line<50;line++)); do
# awk ‘NR==$line' PhraseList.txt; done
... (5 Replies)
Discussion started by: Seth
5 Replies
LEARN ABOUT PHP
fbsql_query
FBSQL_QUERY(3) 1 FBSQL_QUERY(3)fbsql_query - Send a FrontBase querySYNOPSIS
resource fbsql_query (string $query, [resource $link_identifier], [int $batch_size])
DESCRIPTION
Sends a $query to the currently active database on the server.
If the query succeeds, you can call fbsql_num_rows(3) to find out how many rows were returned for a SELECT statement or
fbsql_affected_rows(3) to find out how many rows were affected by a DELETE, INSERT, REPLACE, or UPDATE statement.
PARAMETERS
o $query
- The SQL query to be executed.
Note
The query string shall always end with a semicolon.
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.
o $batch_size
-
RETURN VALUES fbsql_query(3) returns TRUE (non-zero) or FALSE to indicate whether or not the query succeeded. A return value of TRUE means that the query
was legal and could be executed by the server. It does not indicate anything about the number of rows affected or returned. It is perfectly
possible for a query to succeed but affect no rows or return no rows.
For SELECT statements, fbsql_query(3) returns a new result identifier that you can pass to fbsql_result(3).
fbsql_query(3) will also fail and return FALSE if you don't have permission to access the table(s) referenced by the query.
EXAMPLES
The following query is syntactically invalid, so fbsql_query(3) fails and returns FALSE:
Example #1
fbsql_query(3) example
<?php
$result = fbsql_query("SELECT * WHERE 1=1")
or die ("Invalid query");
?>
The following query is semantically invalid if my_col is not a column in the table my_tbl, so fbsql_query(3) fails and returns FALSE:
Example #2
fbsql_query(3) example
<?php
$result = fbsql_query ("SELECT my_col FROM my_tbl;")
or die ("Invalid query");
?>
SEE ALSO fbsql_affected_rows(3), fbsql_db_query(3), fbsql_free_result(3), fbsql_result(3), fbsql_select_db(3), fbsql_connect(3).
PHP Documentation Group FBSQL_QUERY(3)