當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Library::getTableName方法代碼示例

本文整理匯總了PHP中Library::getTableName方法的典型用法代碼示例。如果您正苦於以下問題:PHP Library::getTableName方法的具體用法?PHP Library::getTableName怎麽用?PHP Library::getTableName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Library的用法示例。


在下文中一共展示了Library::getTableName方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getLoadSql

    public static function getLoadSql()
    {
        $tableName = Library::getTableName();
        return '
			SELECT
				`' . $tableName . '`.*
			FROM
				`' . Library::getDbName() . '`.`' . $tableName . '`
		';
    }
開發者ID:jmhobbs,項目名稱:MkLst,代碼行數:10,代碼來源:Library_Generated.class.php

示例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);
            }
        }
    }
開發者ID:jmhobbs,項目名稱:MkLst,代碼行數:27,代碼來源:Book_Generated.class.php

示例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`
		';
    }
開發者ID:jmhobbs,項目名稱:MkLst,代碼行數:16,代碼來源:Book2library_Generated.class.php


注:本文中的Library::getTableName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。