Пример #1
0
    public static function getLoadSql()
    {
        $tableName = CustPc::getTableName();
        return '
			SELECT
				`' . $tableName . '`.*
			FROM
				`' . CustPc::getDbName() . '`.`' . $tableName . '`
		';
    }
Пример #2
0
    public function loadCustPc_Collection_ByNetworkIdVerejna()
    {
        // Always create the collection
        $collection = new CustPc_Collection();
        $this->setCustPc_Collection_ByNetworkIdVerejna($collection);
        // But only populate it if we have key ID
        if ($this->hasKeyId()) {
            $db = CustPc::getDb();
            $tableName = CustPc::getTableName();
            $sql = '
				SELECT
					`' . $tableName . '`.*
				FROM
					`' . CustPc::getDbName() . '`.`' . $tableName . '`
				WHERE
					`' . $tableName . '`.`networkIdVerejna` = ' . $db->quote($this->getId()) . '
			';
            // Construct and populate the collection
            $collection->loadBySql($sql);
            foreach ($collection as $element) {
                $element->setNetworkIdVerejna_Object($this);
            }
        }
    }