Hello guys,
I am new here and getting familiar with OSClass.
So, let me tell you the issue.
Well, I am trying osclass on localhost, everything works fine up to now, the only thing that went wrong is when a user(a fake one) try to update his profile, Im' getting this error:
Fatal error: Uncaught exception 'Exception' with message '1054' in /var/www/osclass/oc-includes/osclass/db.php:127 Stack trace: #0 /var/www/osclass/oc-includes/osclass/classes/DAO.php(187): DB->osc_dbExec('UPDATE oc_t_use...') #1 /var/www/osclass/user.php(221): DAO->update(Array, Array) #2 {main} thrown in /var/www/osclass/oc-includes/osclass/db.php on line 127
Trying to solve it myself I went to db.php on line 127 and figured out that the '$sql' variable has value 'null', and could not find any sql statement to update to the database.
For what Ive noticed up to now an sql statement has to be created in order to make it successful, am I right?
I also made another test with this code on line 127 of db.php file:
if(!$result) {
$this->debug($sql . ' | ' . $this->db->error . ' (' . $this->db->errno . ')', false) ;
if ( $this->dbLogLevel == LOG_NONE ) throw new Exception( $this->db->errno );
} else {
$this->debug($sql) ;
}
Then I made a slight alteration like the following:
if($result)
The the code worked without the message, but obviously that the database was not updated.
So I realized that an sql statement is missing, since I am still understand osclass, I'd like u to tell me a faster way to solve this, correctly.
Thanks in advance.