I am having a small issue with the following
public function getSiteName() {
$query = "SELECT name FROM siteinfo";
$result = $this->con->query($query);
$row = $result->fetch_array(MYSQLI_ASSOC);
printf ("%s (%s)
", $row["name"]);
}
I do NOT get an error when connecting to the database however I get the following
Fatal error: Call to a member function fetch_array() on a non-object in /Users/russellharrower/Sites/evocca/etrading/system/core.php on line 15
I am wondering why would it not work? I used http://php.net/manual/en/mysqli-result.fetch-array.php
The engine am using is InnoDB