Hello together,
I a trying to build a SQL query:
SELECT * FROM `newsletters_settings` WHERE `newsletters_settings`.`key` = 'plugin_id';
Therefor I use this code:
$return = $this->Record->
select()->
from("newsletters_settings")->
where("newsletters_settings.key", "=", "plugin_id")->
fetch();
But the result is null, and a var_dump shows the following:
object(PDOStatement)#97 (1) {
["queryString"]=>
string(75) "SELECT * FROM `newsletters_settings` WHERE `newsletters_settings`.`key` = ?"
}
What am I doing wrong?
Thanks in advance,
Christopher