Closed dazzag24 closed 10 years ago
Looking at the code, I don't know why the SQL command failed, but it wouldn't it make sense to check that $result is valid before calling fetch_array() ?
public function eventlist($userid)
{
$list = array();
$result = $this->mysqli->query("SELECT * FROM event WHERE userid
= '$userid'");
while ($row = $result->fetch_array())
{
$list[] = $row;
}
return $list;
}
Did you run the database update (admin page-> Update & Check button) ?
Erm, no, I didn't. Is this documented?
Actually now you come to mention it, where is the link to the admin page. I don't seem to have one.....
Neither do I, I assumed it didn't exist in the more recent versions which use timestore
Interesting.... I assumed that MySQL is still used behind the scenes for some data. I certainly have some feeds that are tagged as type MYSQL in the engine column (power_kwhd and power_histogram).
I can see an "admin" directory under /var/www/emoncms
Make sure you log in with the first user you created when installing emoncms, either that or set the flag admin to 1 in the users table (mysql) for the user you are using. Mysql is still used (as far as I know) for storing config and plugin data, for the feeds,inputs and dashboards related tables. Once you log in as an admin user you should see an additional option in the menu.
I took the second option (setting admin flag to 1) and after logging out then in the 'Admin' menu option appeared. Thanks for the tip.
I've only created one user. How come my admin page is missing?
How do I edit the MySQL table directly?
Logged out and logged in again. I know see the admin link.
Thanks. With the "Update & Check" button present I now seem to have the event module installed.
Fatal error: Call to a member function fetch_array() on a non-object in /var/www/emoncms/Modules/event/event_model.php on line 67
installed emoncms from github 2 days ago as per these instructions: http://emoncms.org/site/docs/installlinux
I am not running on a RaspberryPi.
I installed the event module just now and am getting the above error when I click on the new "events" link under extras. I have installed 2 other modules just now and they both seem fine.