Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Db:update Syntax
  • I am trying to update a row in the database but I could not find an example in the Docs on how to use DB::update. Can anyone share one please? thank you
  • From the session db driver:
    // update the database
    $result = \DB::update($this->config['table'])->set($session)->where('session_id', '=', $this->record->get('session_id'))->execute($this->config['database']);
    
    to use the current database connection, just use execute().
  • Thank you !! :)

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion