Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

cubrid_fetch_lengths(3) [php man page]

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 row

SYNOPSIS
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_COLUMN_TYPES(3)							 1						    CUBRID_COLUMN_TYPES(3)

cubrid_column_types - Get column types in result

SYNOPSIS
array cubrid_column_types (resource $req_identifier) DESCRIPTION
The cubrid_column_types(3) function gets column types of query results by using $req_identifier. PARAMETERS
o $req_identifier -Request identifier. RETURN VALUES
Array of string values containing the column names, when process is successful. FALSE, when process is unsuccessful. EXAMPLES
Example #1 cubrid_column_types(3) example <?php $conn = cubrid_connect("localhost", 33000, "demodb", "dba"); $result = cubrid_execute($conn, "SELECT * FROM game WHERE host_year=2004 AND nation_code='AUS' AND medal='G'"); $column_names = cubrid_column_names($result); $column_types = cubrid_column_types($result); printf("%-30s %-30s %-15s ", "Column Names", "Column Types", "Column Maxlen"); for($i = 0, $size = count($column_names); $i < $size; $i++) { $column_len = cubrid_field_len($result, $i); printf("%-30s %-30s %-15s ", $column_names[$i], $column_types[$i], $column_len); } cubrid_disconnect($conn); ?> The above example will output: Column Names Column Types Column Maxlen host_year integer 11 event_code integer 11 athlete_code integer 11 stadium_code integer 11 nation_code char 3 medal char 1 game_date date 10 SEE ALSO
cubrid_column_names(3), cubrid_prepare(3), cubrid_execute(3). PHP Documentation Group CUBRID_COLUMN_TYPES(3)
Man Page

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Days of the month

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)
Discussion started by: Anamika
6 Replies

2. Shell Programming and Scripting

Need help in awk

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)
Discussion started by: cskumar
6 Replies

3. Shell Programming and Scripting

Array and Selection

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)
Discussion started by: ZINGARO
4 Replies

4. UNIX for Dummies Questions & Answers

how many are these ..?

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)
Discussion started by: ak835
2 Replies

5. Shell Programming and Scripting

Ip Location Lookup

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)
Discussion started by: mustafayilmaz
2 Replies

6. Shell Programming and Scripting

Extract row grater than 3 from previous value of a field

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)
Discussion started by: rramkrishnas
2 Replies