Query: cubrid_is_instance
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
CUBRID_IS_INSTANCE(3) 1 CUBRID_IS_INSTANCE(3) cubrid_is_instance - Check whether the instance pointed by OID existsSYNOPSISint cubrid_is_instance (resource $conn_identifier, string $oid)DESCRIPTIONThe cubrid_is_instance(3) function is used to check whether the instance pointed by the given $oid exists or not.PARAMETERSo $conn_identifier -Connection identifier. o $oid -OID of the instance that you want to check the existence.RETURN VALUES1, if such instance exists; 0, if such instance does not exist; -1, in case of errorEXAMPLESExample #1 cubrid_is_instance(3) example <?php $conn = cubrid_connect("localhost", 33000, "demodb"); $sql = <<<EOD SELECT host_year, medal, game_date FROM game WHERE athlete_code IN (SELECT code FROM athlete WHERE name='Thorpe Ian'); EOD; $req = cubrid_execute($conn, $sql, CUBRID_INCLUDE_OID); $oid = cubrid_current_oid($req); $res = cubrid_is_instance ($conn, $oid); if ($res == 1) { echo "Instance pointed by $oid exists. "; } else if ($res == 0){ echo "Instance pointed by $oid doesn't exist. "; } else { echo "error "; } cubrid_disconnect($conn); ?> The above example will output: Instance pointed by @0|0|0 doesn't exist.SEE ALSOcubrid_drop(3), cubrid_get_class_name(3). PHP Documentation Group CUBRID_IS_INSTANCE(3)
Related Man Pages |
---|
cubrid_col_size(3) - php |
cubrid_drop(3) - php |
cubrid_lock_write(3) - php |
cubrid_set_add(3) - php |
cubrid_set_drop(3) - php |
Similar Topics in the Unix Linux Community |
---|
find files |
Checking the file if it exists |
Problem in Passing sql query for a script |
Sort numbers which has colon (:) in between |
Check if file exists |