I have a Transaction File coming into the system. In this file, in all records the relevant data is as follows-
Position 1:10 -> Transaction Code
Position 252:255 -> 4 digit business code
Now based on these 2 fields I have to alter value in Transaction code (Position 1:10)... (6 Replies)
Hi,
This is something that probably it is more difficult to explain than to do.
I have two files e.g.
FILE1
A15 8.3102E+00 3.2000E-04
A15 8.5688E+00 4.3000E-05
B13 5.1100E-01 1.9960E+00
B16 5.1100E-01 2.3000E-03
B16 8.6770E-01 1.0000E-07
B16 9.8693E-01 3.4000E-05... (4 Replies)
Input file
data_2 USA
data_2 JAPAN
data_3 UK
data_4 Brazil
data_5 Singapore
data_5 Indo
data_5 Thailand
data_6 China
Desired output file
data_2 USA/JAPAN
data_3 UK
data_4 Brazil
data_5 Singapore/Indo/Thailand
data_6 China
I would like to merge all data content that share same... (2 Replies)
Hi,
I have a data file with :
01/28/2012,1,1,98995
01/28/2012,1,2,7195
01/29/2012,1,1,98995
01/29/2012,1,2,7195
01/30/2012,1,1,98896
01/30/2012,1,2,7083
01/31/2012,1,1,98896
01/31/2012,1,2,7083
02/01/2012,1,1,98896
02/01/2012,1,2,7083
02/02/2012,1,1,98899
02/02/2012,1,2,7083
I... (1 Reply)
i have a input of csv file as below but the sequence of column get changed.
I,e it is not necessary that name comes first then age and rest all, it may vary.
name,age,marks,roll,section
kevin,25,80,456,A
Satch,23,56,789,B
Meena,24,78,H245,C
So i want to print that column entires which... (12 Replies)
Discussion started by: millan
12 Replies
LEARN ABOUT PHP
cubrid_fetch_field
CUBRID_FETCH_FIELD(3) 1 CUBRID_FETCH_FIELD(3)cubrid_fetch_field - Get column information from a result and return as an objectSYNOPSIS
object cubrid_fetch_field (resource $result, [int $field_offset])
DESCRIPTION
This function returns an object with certain properties of the specific column. The properties of the object are:
o $name
-column name
o $table
-name of the table that the column belongs to
o $def
-default value of the column
o $max_length
-maximum length of the column
o $not_null
-1 if the column cannot be NULL
o $primary_key
-1 if the column is a primary key
o $unique_key
-1 if the column is an unique key
o $multiple_key
-1 if the column is a non-unique key
o $numeric
-1 if the column is numeric
o $blob
-1 if the column is a BLOB
o $type
-the type of the column
o $unsigned
-1 if the column is unsigned
o $zerofill
-1 if the column is zero-filled
PARAMETERS
o $result
-$result comes from a call to cubrid_execute(3)
o $field_offset
- The numerical field offset. If the field offset is not specified, the next field (that was not yet retrieved by this function)
is retrieved. The $field_offset starts at 0.
RETURN VALUES
Object with certain properties of the specific column, when process is successful.
FALSE on failure.
EXAMPLES
Example #1
cubrid_fetch_field(3) example
<?php
$conn = cubrid_connect("localhost", 33000, "demodb");
$req = cubrid_execute($conn, "SELECT event_code,athlete_code,nation_code,game_date FROM game WHERE host_year=1988 and event_code=20001;");
var_dump(cubrid_fetch_row($req));
cubrid_field_seek($req, 1);
$field = cubrid_fetch_field($req);
printf("
--- Field Properties ---
");
printf("%-30s %s
", "name:", $field->name);
printf("%-30s %s
", "table:", $field->table);
printf("%-30s "%s"
", "default value:", $field->def);
printf("%-30s %d
", "max length:", $field->max_length);
printf("%-30s %d
", "not null:", $field->not_null);
printf("%-30s %d
", "primary key:", $field->primary_key);
printf("%-30s %d
", "unique key:", $field->unique_key);
printf("%-30s %d
", "multiple key:", $field->multiple_key);
printf("%-30s %d
", "numeric:", $field->numeric);
printf("%-30s %d
", "blob:", $field->blob);
printf("%-30s %s
", "type:", $field->type);
printf("%-30s %d
", "unsigned:", $field->unsigned);
printf("%-30s %d
", "zerofill:", $field->zerofill);
cubrid_close_request($req);
cubrid_disconnect($conn);
?>
The above example will output:
array(4) {
[0]=>
string(5) "20001"
[1]=>
string(5) "16681"
[2]=>
string(3) "KOR"
[3]=>
string(9) "1988-9-30"
}
--- Field Properties ---
name: athlete_code
table: game
default value: ""
max length: 0
not null: 1
primary key: 1
unique key: 1
multiple key: 0
numeric: 1
blob: 0
type: integer
unsigned: 0
zerofill: 0
PHP Documentation Group CUBRID_FETCH_FIELD(3)