0

We're using phinx-db for migrations.

I'm trying to find out what happens if a query fails using the execute command. The documentation is not clear about this.

In other words, if I call $this->execute("my sql statement"); and the statement fails, will execute throw an exception? Or will it just fail silently with zero rows updated?

With batch executions any failure is silent, but the documentation does say what happens for a single statement.

Tim
  • 197
  • 1
  • 1
  • 10

1 Answers1

0

Using with PDO it throws a exception.

But I think it may vary depending on which adapter you are using.

Marcos
  • 1,240
  • 10
  • 20