mysql_xdevapi\Collection
PHP Manual

Collection::existsInDatabase

(No version information available, might only be in Git)

Collection::existsInDatabaseCheck if collection exists in database

说明

public bool mysql_xdevapi\Collection::existsInDatabase ( void )

Checks if the Collection object refers to a collection in the database.

参数

此函数没有参数。

返回值

Returns TRUE if collection exists in the database, else FALSE if it does not.

范例

Example #1 mysql_xdevapi\Collection::existsInDatabase() example

<?php

// Assuming $coll is a valid Collection object

if( !$coll->existsInDatabase() ) {
    print(
'Sorry, but the collection do not exists in the provided database!');
}
?>

mysql_xdevapi\Collection
PHP Manual