CUBRID_DB_NAME(3) 1 CUBRID_DB_NAME(3)cubrid_db_name - Get db name from results of cubrid_list_dbsSYNOPSIS
string cubrid_db_name (array $result, int $index)
DESCRIPTION
Retrieve the database name from a call to cubrid_list_dbs(3).
PARAMETERS
o $result
- The result pointer from a call to cubrid_list_dbs(3).
o $index
- The index into the result set.
RETURN VALUES
Returns the database name on success, and FALSE on failure. If FALSE is returned, use cubrid_error(3) to determine the nature of the
error.
EXAMPLES
Example #1
cubrid_db_name(3) example
<?php
error_reporting(E_ALL);
$conn = cubrid_connect('localhost', 33000, 'demodb', 'dba', '');
$db_list = cubrid_list_dbs($conn);
$i = 0;
$cnt = count($db_list);
while ($i < $cnt) {
echo cubrid_db_name($db_list, $i) . "
";
$i++;
}
?>
The above example will output:
demodb
SEE ALSO cubrid_list_dbs(3).
PHP Documentation Group CUBRID_DB_NAME(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)
check this out
ls -l nmo*
-rwsr-s--- 1 root dba 19312 Mar 31 14:44 nmo
-rw-r----- 1 oracle dba 0 May 19 2004 nmo0
-rwxr-x--- 1 oracle dba 16512 Mar 31 14:44 nmocat
# rm nmo0
nmo0: No such file or directory
# id
uid=0(root) gid=1(other)
what... (8 Replies)
Hi,
It seems someone has created files instead of actually running the commands, as below:
-rw-r--r-- 1 oracle92 dba 0 Mar 2 11:19 PRIML_070302.ok
-rw-r--r-- 1 oracle92 dba 557 Mar 2 11:20 PRIVH_070302.dat
-rw-r--r-- 1 oracle92 dba 0 Mar 12 11:57... (2 Replies)
I want to check the length of a parameter passed to the korn shell. I've tested:
xxx=hello
echo $xxx
cnt=`echo $xxx |wc -c`
echo "cnt $cnt"
(xxx will be the parm). $cnt is 6, it should be 5. I keep getting 1 more then I should. Why is that? How do I code to get the length of a parameter? (4 Replies)
How can I get Parameters with Shell Request.
I mean so but not work:
PHP:
error_reporting(E_ALL);
$hallo ="Hallo Welt";
print_r(shell_exec("sh client.sh $hallo"));
Shell:
echo $hallo
echo ceck (5 Replies)