CUBRID_FETCH_LENGTHS(3) 1 CUBRID_FETCH_LENGTHS(3)cubrid_fetch_lengths - Return an array with the lengths of the values of each field from the current rowSYNOPSIS
array cubrid_fetch_lengths (resource $result)
DESCRIPTION
This function returns an numeric array with the lengths of the values of each field from the current row of the result set or it returns
FALSE on failure.
Note
If field data type is BLOB/CLOB, you should get its length by using cubrid_lob_size(3).
PARAMETERS
o $result
-$result comes from a call to cubrid_execute(3)RETURN VALUES
An numeric array, when process is successful.
FALSE on failure.
EXAMPLES
Example #1
cubrid_fetch_lengths(3) example
<?php
$conn = cubrid_connect("localhost", 33000, "demodb");
$result = cubrid_execute($conn, "SELECT * FROM game WHERE host_year=2004 AND nation_code='AUS' AND medal='G'");
$row = cubrid_fetch_row($result);
print_r($row);
$lens = cubrid_fetch_lengths($result);
print_r($lens);
cubrid_disconnect($conn);
?>
The above example will output:
Array
(
[0] => 2004
[1] => 20085
[2] => 15118
[3] => 30134
[4] => AUS
[5] => G
[6] => 2004-8-20
)
Array
(
[0] => 4
[1] => 5
[2] => 5
[3] => 5
[4] => 3
[5] => 1
[6] => 10
)
PHP Documentation Group CUBRID_FETCH_LENGTHS(3)
Check Out this Related Man Page
CUBRID_FIELD_NAME(3) 1 CUBRID_FIELD_NAME(3)cubrid_field_name - Return the name of the specified field indexSYNOPSIS
string cubrid_field_name (resource $result, int $field_offset)
DESCRIPTION
This function returns the name of the specified field index on success or it returns FALSE on failure.
PARAMETERS
o $result
-$result comes from a call to cubrid_execute(3)
o $field_offset
- The numerical field offset. The $field_offset starts at 0. If $field_offset does not exist, an error of level E_WARNING is also
issued.
RETURN VALUES
Name of specified field index, on success.
FALSE on failure.
EXAMPLES
Example #1
cubrid_field_name(3) example
<?php
$conn = cubrid_connect("localhost", 33000, "demodb");
$result = cubrid_execute($conn, "SELECT * FROM game WHERE host_year=2004 AND nation_code='AUS' AND medal='G'");
$col_num = cubrid_num_cols($result);
printf("%-30s %s
", "Field Name", "Field Flags");
for($i = 0; $i < $col_num; $i++) {
printf("%-30s %s
", cubrid_field_name($result, $i), cubrid_field_flags($result, $i));
}
cubrid_disconnect($conn);
?>
The above example will output:
Field Name Field Flags
host_year not_null primary_key unique_key
event_code not_null primary_key unique_key foreign_key
athlete_code not_null primary_key unique_key foreign_key
stadium_code not_null
nation_code
medal
game_date
PHP Documentation Group CUBRID_FIELD_NAME(3)
Hello,
Please can someone help me in getitng last 7 days from the current date?
for eg:
input /default : today (10/18/2004)
required output:
10/17/2004
10/16/2004
10/15/2004
10/14/2004
10/13/2004
... (6 Replies)
Dear All,
I have an input like this,
Jerry,20061001,US,
Tom,20061002,US,
Tiny,20061031,UK,
Raj,20061001,UK,
Kumar,20061002,AUS,
Reema,20061101,IN,
And i want to get the count of each date as
20061001,2
20061002,2
20061031,1
20061101,1
I would appreciate if anyone can help me... (6 Replies)
I have a question:
Y X
Tabel a is a array multidimensional --> a(1024,20)
I load in to array a Text from 6000 row where:
in a(1,1) is present the row 1 of original text, in a(1024,1) is present then row 1024 of original test and in... (4 Replies)
Say
I have a variable set as following
A='IND,US,UK,AUS,NZ'
now i want to know how many words are present in this string ?
In above example,i can see 5 country names set to variable A.
How can i find out that variable A is set to a string containing 5 names(items...whatever) in it?
... (2 Replies)
Hello everybody;
I am working on a script about ip location lookup.
I 've a decimal list
dec_list:
16777216,17367039,AU,AUS,AUSTRALIA
17367040,17432575,MY,MYS,MALAYSIA
17432576,17498111,AU,AUS,AUSTRALIA
17498112,17563647,KR,KOR,REPUBLIC OF KOREA
17563648,17825791,CN,CHN,CHINA... (2 Replies)
Hi,
I am trying to extract data where first field unique value and 4th field of next row is grater than first row 4th field.
input data is a below:
7035719974,20-jul-2016 07:42:51,07:42:51,074251,1
7035719974,20-jul-2016 07:43:57,07:43:57,074357,2
7399206761,20-jul-2016... (2 Replies)