By Maine 3 weeks, 3 days ago
1 - Query with SQL prepared statements
Query can be used to make database queries with prepared statements. It requires passing another argument 'parameters' to the query-function.
See (https://trac.cakephp.org/changeset/6687):
$query = "SELECT title, published FROM articles WHERE articles.id = ? AND articles.published = ?";
$params = array(1, 'Y');
$result = $this->Article->query($query, $params);
Login to add a comment
By Maine 3 weeks, 3 days ago
1 - Query with SQL prepared statements
Query can be used to make database queries with prepared statements. It requires passing another argument 'parameters' to the query-function.
See (https://trac.cakephp.org/changeset/6687):
$query = "SELECT title, published FROM articles WHERE articles.id = ? AND articles.published = ?";
$params = array(1, 'Y');
$result = $this->Article->query($query, $params);