Error message from database query

26 views
Skip to first unread message

HarryB

unread,
Aug 5, 2018, 11:37:13 PM8/5/18
to Fat-Free Framework
Hello again,

I am getting this error message:  Call to a member function updateCal() on null etc

This is the call to the query: 
$this->f3->set('update',$test->updateCal($storetext,$compdate1));

This is the query itself: 
public function updateCal($storetext,$compdate1) {
return $this->db->exec("UPDATE calendar SET Results = ? WHERE Competition_Date = ?", array(1=>$storetext,2=>$compdate1));
}

The query works fine if I enter it into phpmyadmin with the strings that are passed substituted for the placeholders.

I'm sure it is likely to be obvious but it has me stumped.

Thanks in anticipation.

Harry

bcosca

unread,
Aug 6, 2018, 3:08:11 AM8/6/18
to Fat-Free Framework
$test is most likely undefined.

HarryB

unread,
Aug 6, 2018, 5:52:07 AM8/6/18
to Fat-Free Framework
Fancy forgetting ( and worse still not being able to notice missing) that first line in the controller.

Many thanks for pointing out the obvious.

Harry

On Monday, 6 August 2018 17:08:11 UTC+10, bcosca wrote:
$test is most likely undefined.
Reply all
Reply to author
Forward
0 new messages