メインコンテンツまでスキップ
Version: Fegg 5.x(開発版)

Pdo::unsetRegularUseQuery

Disable automatic append query for a current query flag

Description​

public self Pdo::unsetRegularUseQuery()

For the next query only, skips the queries added for every table (regular_use in database_regular_use_query.php, see Configuration): valid = 1 on SELECT and count, created / modified / valid on INSERT and modified on UPDATE.

Example​

Controller
$db = new \Fegg\Database\Pdo();

// Select * From "cms_news"
$db->unsetRegularUseQuery()->select('cms_news')->execute();

// Select * From "cms_news" Where "cms_news".valid = 1 (the next query is back to normal)
$db->select('cms_news')->execute();