Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

[Question] PHP

Options
  • 05-01-2016 3:00pm
    #1
    Registered Users Posts: 648 ✭✭✭


    Does anyone here understand this question? If so, would you care to give me the answer so I can begin to understand it?

    Many thanks

    ORwfMC9.png


Comments

  • Registered Users Posts: 6,042 ✭✭✭Talisman


    The code fragment is attempting to perform a database transaction using a try/catch block.

    It's a simple pattern:
    try {
      begin()
      execute()
      commit()
    } catch (exception) {
      rollback()
    }
    

    In fairness it's not that difficult to use a search engine to find the answer.


  • Moderators, Society & Culture Moderators Posts: 17,642 Mod ✭✭✭✭Graham


    Talisman wrote: »
    In fairness it's not that difficult to use a search engine to find the answer.

    That depends on what time the homework has to be handed in.

    This might be useful OP: http://www.boards.ie/vbulletin/showpost.php?p=52731901&postcount=2


Advertisement