This particular application has been in use for over a year now, and uses several dozen models, and I am having trouble only with this one particular new function.
public function get_slides($promo = NULL) {
$sql = "SELECT description as alt, image, link
FROM " . CONFIG_DATABASE . ".slides
WHERE active = '1' AND acct_no = '" . API_ACCT . "' ORDER BY priority ASC;";
$query = $this->db->query($sql);
var_dump($sql);
var_dump($query);
return $query->result_array();
}
The results of this are:
string 'SELECT description as alt, image, link
FROM web_config_development.slides
WHERE active = '1' AND acct_no = '10001' ORDER BY priority ASC;' (length=143)
boolean false
Followed by:
Fatal error: Call to a member function result_array() on a non-object
The query works fine in MySQL Workbench. In my searching for this issue I have come across docs referring to true/false responses on INSERT and DELETE, but not on SELECT.
This does not make any sense ... if you have any ideas, sharing them would be greatly appreciated.
;
at the end of the query string is not allowed?