Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6080565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:04:34+00:00 2026-05-23T11:04:34+00:00

public function updateAuction($id) { $AuctionsTable = Doctrine_Core::getTable(‘auctions’); $auction = $AuctionsTable->find($id); $auction->ends_at += 10; $auction->save();

  • 0
public function updateAuction($id)
{   
    $AuctionsTable = Doctrine_Core::getTable('auctions');

    $auction = $AuctionsTable->find($id);

    $auction->ends_at += 10; 

    $auction->save();
}

I’m using Doctrine to get a record from the database.

I need to increase number of seconds on this records ends_at column, which is a date type.

+= of course didn’t work. What is the quickest way to add, let’s say, 10 seconds to ends_at variable? And having handled all the other nuisances that might appear (59 + 10 = 69 seconds).

Perhaps I should use mysql’s addtime() function? But is that implemented with Doctrine? Didn’t find anything about addtime() on doctrine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:04:34+00:00Added an answer on May 23, 2026 at 11:04 am
    1. Convert the value from the DB into a DateTime object in PHP
    2. Use the DateTime::add function to add the seconds
    3. Put the resulting value back into the DB
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have public function executeIndex(sfWebRequest $request) { $this->plans = Doctrine_Core::getTable('Messages') ->createQuery('a') ->execute(); } I
public function executeSearch(sfWebRequest $request) { $q = Doctrine_Core::getTable('News') ->createQuery('a') ->where(a.title LIKE ?, array($request->getParameter('text'))) if
public function save(User $user_object) { $data = array(); $data[] = $user_object->username; $data[] = $user_object->email;
public function getWorksheetData($id) { /** create the following query using select object: SELECT wc.label,
public function __construct($input = null) { if (empty($input)){ return false; } and then there's
public function test(){ $data = ORM::factory('testdata')->find_all(); Table::factory() ->set_body_data($data) ->set_row_titles('id') ->set_column_titles(Table::AUTO) ->set_callback('format_row', 'row') ->render(true); $this->template->title
public function bmdToStr(bmd:BitmapData,width:int,height:int):String { var encoder:JPEGEncoder = new JPEGEncoder(); var encBytes:ByteArray = encoder.encode(bmd); return
public function configure() { $this->widgetSchema['start_date'] = new sfWidgetFormInput(); $this->widgetSchema['end_date'] = new sfWidgetFormInput(); $this->validatorSchema->setPostValidator( new
Public Function CastToT(Of T)(ByVal GenericType(Of Object) data) As GenericType(Of T) Return DirectCast(data, GenericType(Of T))
public function index() { $this->redirect('/'); } I will just go insane soon... How can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.