in reply to Re: Need advice how to diagnose the problem when syntax using MAX() is correct according to MySQL monitor, but errors out in DBI
in thread [SOLVED] Need advice how to diagnose the problem when syntax using MAX() is correct according to MySQL monitor, but errors out in DBI

This is very interesting, strict mode and quoting names/identifiers.

I clearly do not want what you described, truncating strings or inserting zeroes in place of formatted data.

Now I am asking myself, is it better to add backticks for identifiers? Maybe these can help prevent the behaviour you described?

Regarding the other data... iirc the DBI documentation says one should not put the question marks into quotes or ticks...
  • Comment on Re^2: Need advice how to diagnose the problem when syntax using MAX() is correct according to MySQL monitor, but errors out in DBI

Replies are listed 'Best First'.
Re^3: Need advice how to diagnose the problem when syntax using MAX() is correct according to MySQL monitor, but errors out in DBI
by ysth (Canon) on Nov 23, 2025 at 17:18 UTC
    Are you using question marks? You can't for identifiers (table, column, or database names).
Re^3: Need advice how to diagnose the problem when syntax using MAX() is correct according to MySQL monitor, but errors out in DBI
by ysth (Canon) on Nov 23, 2025 at 17:49 UTC
    Note that MySQL has had a decent set of defaults since 5.5. The non-strictness mentioned mostly just applies if you have config files preserving the sql_mode from earlier versions.