in reply to Re: Perl DBI not storing @prev_value in query
in thread Perl DBI not storing @prev_value in query

I have a statement including this: @row_num := @row_num + 1 AS rownum elsewhere in my code (in a $dbh->selectrow_array) and it works as expected, so it seems to be that it allows variables but doesn't not "store" them. Strange, as I thought DBI just sends the query to MySQL, I didn't think it needed to understand every aspect of the query?

Replies are listed 'Best First'.
Re^3: Perl DBI not storing @prev_value in query
by Beaker (Beadle) on Jan 24, 2018 at 17:25 UTC
    This is tricky because I have refactored with MySQL query as my last version was very inefficient, taking 5 seconds + to execute. This one is super fast but it doesn't look like I can use it if DBI won't support it, so I'm stuck now.