in reply to [SOLVED] Need advice how to diagnose the problem when syntax using MAX() is correct according to MySQL monitor, but errors out in DBI
As a guess based on the "near" position given in the error messages, I'd try removing the semicolon from your SQL statement. i.e.
my $sqlcmd = "SELECT MAX($p_db_art_id) FROM $my_articletable"; [download]