Using the MySQLi class made by Ajillion :: https://github.com/ajillion/PHP-MySQLi-Database-Class
I would like to execute the following command
$command = "UPDATE sessions SET active = 0 WHERE DATE_ADD(last, INTERVAL life MINUTE) <= now()";
and I'm not sure how to do it with the class. Is there a way I can manage WHERE statements like this using that class, especially for UPDATE commands since normal queries I can $mysqli->rawQuery() the command.
The problem with running rawQuery() on the command above is that I get a
PHP Fatal error: Call to a member function fetch_field() on a non-object
since it is trying to gather the results that an UPDATE command doesn't give.
This has appeared to solve the issue.
change line 101
to
I then went on to add
after line 401
There may be a better way to do this but this is what I did and it seems to work.