cubrid_num_cols(3) php man page | unix.com

Man Page: cubrid_num_cols

Operating Environment: php

Section: 3

CUBRID_NUM_COLS(3)							 1							CUBRID_NUM_COLS(3)

cubrid_num_cols - Return the number of columns in the result set

SYNOPSIS
int cubrid_num_cols (resource $result)
DESCRIPTION
The cubrid_num_cols(3) function is used to get the number of columns from the query result. It can only be used when the query executed is a select statement.
PARAMETERS
o $result -Result.
RETURN VALUES
Number of columns, when process is successful. FALSE, if SQL statement is not SELECT.
EXAMPLES
Example #1 cubrid_num_cols(3) example <?php $conn = cubrid_connect("localhost", 33000, "demodb", "dba"); $req = cubrid_execute($conn, "SELECT * FROM code"); $row_num = cubrid_num_rows($req); $col_num = cubrid_num_cols($req); printf("Row Num: %d Column Num: %d ", $row_num, $col_num); cubrid_disconnect($conn); ?> The above example will output: Row Num: 6 Column Num: 2
SEE ALSO
cubrid_execute(3), cubrid_num_rows(3). PHP Documentation Group CUBRID_NUM_COLS(3)
Related Man Pages
cubrid_current_oid(3) - php
cubrid_field_table(3) - php
cubrid_field_type(3) - php
cubrid_lock_write(3) - php
cubrid_num_cols(3) - php
Similar Topics in the Unix Linux Community
meaning of columns in the result of executing 'ls -l'
Comparing two columns
Request: How to Parse dynamic SQL query to pad extra columns to match the fixed number of columns
Filter Row Based On Max Column Value After Group BY
Fetching 1st Column and Last n Columns