Table::newSelectStatement([$params])
Version 2024.3
Find or create page with given unique values
Version 2024.3
Find or create page with given unique values
Find a page with given unique values. If page was not found, creates a new page and sets unique values to it.
Given values are NOT parsed through fieldtype query parser. Ie. given values are directly used in MySQL query and value setting.
Object DatabaseStatementSelect
Get Select statement for certain table:
$Invoice = $this->get('table', 'invoice');
$Statement = $Invoice->newSelectStatement();
Will produce a statement:
SELECT
invoice.*
FROM
kayttaja_X_invoice AS invoice
WHERE
( invoice.poistettu = 0 )
ORDER BY
billing_date desc
Uses table preferences for ORDER -clause