Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
START TRANSACTION Clarification
  • Is this not redundant?

    public function start_transaction()
    {
    $this->query(0, 'SET AUTOCOMMIT=0', false);
    $this->query(0, 'START TRANSACTION', false);
    $this->_in_transaction = true;
    return true;
    }

    Doesn't SET AUTOCOMMMIT=0 Start the transaction?

    The reason why it is an issue for me is I want to LOCK the table as well.

    You can't LOCK a table from within a Transaction using START TRANSACTION.


    From MySQL (5.0) docs.

    • SET autocommit=0;
      LOCK TABLES t1 WRITE, t2 READ, ...;
      ... do something with tables t1 and t2 here ...
      COMMIT;
      UNLOCK TABLES;

      And yes I know 5.0 is old...  but I am working in 5.1 (RHE6)

       Was forced to delete most of this (Body is 3662 characters too long.)

  • Please create a ticket for it so Frank can have a look. Most of the current DB layer is ex-Kohana and over three years old.
  • Added it in GitHub. We will see what he says.  


  • Saw it, thanks.

Howdy, Stranger!

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

In this Discussion