本文整理汇总了PHP中Library::getDbName方法的典型用法代码示例。如果您正苦于以下问题:PHP Library::getDbName方法的具体用法?PHP Library::getDbName怎么用?PHP Library::getDbName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Library
的用法示例。
在下文中一共展示了Library::getDbName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getLoadSql
public static function getLoadSql()
{
$tableName = Library::getTableName();
return '
SELECT
`' . $tableName . '`.*
FROM
`' . Library::getDbName() . '`.`' . $tableName . '`
';
}
示例2: loadBook2library_Collection
public function loadBook2library_Collection()
{
// Always create the collection
$collection = new Book2library_Collection();
$this->setBook2library_Collection($collection);
// But only populate it if we have key ID
if ($this->hasKeyId()) {
$db = Book2library::getDb();
$tableName = Book2library::getTableName();
$sql = '
SELECT
`' . $tableName . '`.*
, ' . implode("\n\t\t\t\t\t, ", CoughObject::getFieldAliases('Library', 'Library_Object', 'library')) . '
FROM
`' . Book2library::getDbName() . '`.`' . $tableName . '`
INNER JOIN `' . Library::getDbName() . '`.`' . Library::getTableName() . '` AS `library`
ON `' . $tableName . '`.`library_id` = `library`.`library_id`
WHERE
`' . $tableName . '`.`book_id` = ' . $db->quote($this->getBookId()) . '
';
// Construct and populate the collection
$collection->loadBySql($sql);
foreach ($collection as $element) {
$element->setBook_Object($this);
}
}
}
示例3: getLoadSql
public static function getLoadSql()
{
$tableName = Book2library::getTableName();
return '
SELECT
`' . $tableName . '`.*
, ' . implode("\n\t\t\t\t, ", CoughObject::getFieldAliases('Book', 'Book_Object', 'book')) . '
, ' . implode("\n\t\t\t\t, ", CoughObject::getFieldAliases('Library', 'Library_Object', 'library')) . '
FROM
`' . Book2library::getDbName() . '`.`' . $tableName . '`
INNER JOIN `' . Book::getDbName() . '`.`' . Book::getTableName() . '` AS `book`
ON `' . $tableName . '`.`book_id` = `book`.`book_id`
INNER JOIN `' . Library::getDbName() . '`.`' . Library::getTableName() . '` AS `library`
ON `' . $tableName . '`.`library_id` = `library`.`library_id`
';
}