Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
DB::Update field = field + 1
  • I tried doing this in fuel but was not successfull this is my code :
    DB::update('table')->value('field','field' +1)
    ->where('id','=',$id)>execute(); but I keep getting the value "1" in the field as opposed to +1 thank you for your help
  • You might need to use
    DB:expr( DB::quote_identifier('field') . ' + 1')
    
  • thank you!!! it works beautifully

Howdy, Stranger!

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

In this Discussion