当前位置: 首页>>代码示例>>PHP>>正文


PHP Book::getDbName方法代码示例

本文整理汇总了PHP中Book::getDbName方法的典型用法代码示例。如果您正苦于以下问题:PHP Book::getDbName方法的具体用法?PHP Book::getDbName怎么用?PHP Book::getDbName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Book的用法示例。


在下文中一共展示了Book::getDbName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getLoadSql

    public static function getLoadSql()
    {
        $tableName = Book::getTableName();
        return '
			SELECT
				`' . $tableName . '`.*
				, ' . implode("\n\t\t\t\t, ", CoughObject::getFieldAliases('Author', 'Author_Object', 'author')) . '
			FROM
				`' . Book::getDbName() . '`.`' . $tableName . '`
				INNER JOIN `' . Author::getDbName() . '`.`' . Author::getTableName() . '` AS `author`
					ON `' . $tableName . '`.`author_id` = `author`.`author_id`
		';
    }
开发者ID:jmhobbs,项目名称:MkLst,代码行数:13,代码来源:Book_Generated.class.php

示例2: getLoadSql

    public static function getLoadSql()
    {
        $tableName = Book::getTableName();
        return '
			SELECT
				`' . $tableName . '`.*
			FROM
				`' . Book::getDbName() . '`.`' . $tableName . '`
		';
    }
开发者ID:jmhobbs,项目名称:MkLst,代码行数:10,代码来源:Book_Generated.class.php

示例3: loadBook_Collection

    public function loadBook_Collection()
    {
        // Always create the collection
        $collection = new Book_Collection();
        $this->setBook_Collection($collection);
        // But only populate it if we have key ID
        if ($this->hasKeyId()) {
            $db = Book::getDb();
            $tableName = Book::getTableName();
            $sql = '
				SELECT
					`' . $tableName . '`.*
				FROM
					`' . Book::getDbName() . '`.`' . $tableName . '`
				WHERE
					`' . $tableName . '`.`author_id` = ' . $db->quote($this->getAuthorId()) . '
			';
            // Construct and populate the collection
            $collection->loadBySql($sql);
            foreach ($collection as $element) {
                $element->setAuthor_Object($this);
            }
        }
    }
开发者ID:jmhobbs,项目名称:MkLst,代码行数:24,代码来源:Author_Generated.class.php

示例4: 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('Book', 'Book_Object', 'book')) . '
				FROM
					`' . Book2library::getDbName() . '`.`' . $tableName . '`
					INNER JOIN `' . Book::getDbName() . '`.`' . Book::getTableName() . '` AS `book`
						ON `' . $tableName . '`.`book_id` = `book`.`book_id`
				WHERE
					`' . $tableName . '`.`library_id` = ' . $db->quote($this->getLibraryId()) . '
			';
            // Construct and populate the collection
            $collection->loadBySql($sql);
            foreach ($collection as $element) {
                $element->setLibrary_Object($this);
            }
        }
    }
开发者ID:jmhobbs,项目名称:MkLst,代码行数:27,代码来源:Library_Generated.class.php

示例5: 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`
		';
    }
开发者ID:jmhobbs,项目名称:MkLst,代码行数:16,代码来源:Book2library_Generated.class.php


注:本文中的Book::getDbName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。