Hi,
I have a comma delimited text file where character fields (as opposed to numeric and date fields) are always enclosed with double quotes. Records are separated by the newline character. In a shell script I would like to split a particular field into two separate fields (enclosed with double... (4 Replies)
Hi,
I have a file that has data in it that says
00:01:48.233 1212
00:01:56.233 345
00:09:01.221 5678
00:12:23.321 93444
The file has more line than this but i just wanted to put in a snippet to ask how I would get the highest number with time stamp into another file. So from the above... (2 Replies)
I'm trying extract a number of filename fields from a log file and copy them out as separate rows in a text file so i can load them into a table. I'm able to get the filenames but the all appear on one line. I tried using the cut command with the -d (delimiter) option but cant seem to make it... (1 Reply)
Hello,
I'm trying to get a value based on a comparison of two fields, this is:
file1
687.45
687.18
687.322
687.405
686.865
file 2
685 6.43
686 6.43
687 6.42
688 6.42 (3 Replies)
Hi experts,
I need to print the first field first then last two fields should come next and then i need to print rest of the fields.
Input :
a1,abc,jsd,fhf,fkk,b1,b2
a2,acb,dfg,ghj,b3,c4
a3,djf,wdjg,fkg,dff,ggk,d4,d5
Expected output:
a1,b1,b2,abc,jsd,fhf,fkk... (6 Replies)
I have a csv dump from sql server that needs to be converted so it can be feed to another program. I already sorted on field 1 but there are multiple columns with same field 1 where it needs to be compared against and if it is same then append field 5.
i.e from
ANG SJ,0,B,LC22,LC22(0)
BAT... (2 Replies)
I have a .CSV file (file.csv) whose data are all enclosed in double quotes. Sample format of the file is as below:
column1,column2,column3,column4,column5,column6, column7, Column8, Column9, Column10
"12","B000QRIGJ4","4432","string with quotes, and with a comma, and colon: in... (3 Replies)
I have a fileA with one column (1000 rows), and fileB with 26 columns(13000 rows).
I need to search each value of fileA with fileB and return all the 26 values from FileB to a new file- File C if matches. The search value (from FileA) may present in any of the 26 values in FileB. This value is not... (7 Replies)
Hi All,
I need to extract a position in the file and multiple the value by 1000 and the replace it .
Original
0010001200084701217637306521200000000000010010000000 ---> 000847 * 1000
0010012700086001213437404323000000000000001001000000 ---> 000860 * 1000... (2 Replies)
Discussion started by: arunkumar_mca
2 Replies
LEARN ABOUT PHP
pg_num_fields
PG_NUM_FIELDS(3)PG_NUM_FIELDS(3)pg_num_fields - Returns the number of fields in a resultSYNOPSIS
int pg_num_fields (resource $result)
DESCRIPTION pg_num_fields(3) returns the number of fields (columns) in a PostgreSQL result resource.
Note
This function used to be called pg_numfields(3).
PARAMETERS
o $result
- PostgreSQL query result resource, returned by pg_query(3), pg_query_params(3) or pg_execute(3) (among others).
RETURN VALUES
The number of fields (columns) in the result. On error, -1 is returned.
EXAMPLES
Example #1
pg_num_fields(3) example
<?php
$result = pg_query($conn, "SELECT 1, 2");
$num = pg_num_fields($result);
echo $num . " field(s) returned.
";
?>
The above example will output:
2 field(s) returned.
SEE ALSO pg_num_rows(3), pg_affected_rows(3).
PHP Documentation Group PG_NUM_FIELDS(3)