in reply to Re^11: CGI Action call
in thread CGI Action call

As an aside, do you know why this unmatched " is there in 'Dare\"' and escaped \" ?
[Wed Mar 28 15:18:59 2018] update_tables.cgi: Entered update_tables.cg +i Open Database return First Record with action: = 'navigate_records' + at update_tables.cgi line 290. [Wed Mar 28 15:18:59 2018] update_tables.cgi: rowpointer = 'Dare"' at +update_tables.cgi line 292.

Looks like it comes in on the query param.

sub navigate_Records {: my $kind = $query->param('kind'); my $rowpointer = $query->param('searchterm'); my ($sth, $stmt); my @row; warn("Entered update_tables.cgi Open Database return First Record w +ith action: = '$action'"); warn("Search Parameter = '$kind'"); warn("rowpointer = '$rowpointer'"); ...

Replies are listed 'Best First'.
Re^13: CGI Action call
by tultalk (Monk) on Mar 29, 2018 at 13:53 UTC

    Thanks

    That query param contains only Dare, not Dare\".

    Removed the calls to alter table and it works Ok and faster except for the same problem with navigating to previous record

    I copy the SQL from the DBI which failed and past into php MyAdmin SQL and it works fine.

    Do not understand why the difference

      That query param contains only Dare, not Dare\".

      Why then does your log say rowpointer = 'Dare"'

      [Wed Mar 28 15:18:59 2018] update_tables.cgi: rowpointer = 'Dare"' at 003: +update_tables.cgi line 292.
      Removed the calls to alter table

      How are you persisting the sort order variable $sortindex between calls to search_Records() and navigate_Records() ?. You appear to be using the same parameter name kind for sort order in search_Records() and movement direction in navigate_Records(). Why not create another parameter for movement direction and then persist the sort order with it's own parameter.

      poj

        rowpointer = 'Dare"'

        It does indeed

        In php MyAdmin previous (<-) SQL the \" causes the command to just reload the Dare record. Removing the \" from the SQL allows it to fuction property.

        However, in the next (->) SQL the next record is sent to the client as expected with or without removing the \".

        Very strange

        No \" after Dare

        Found problem buried in javascript. Fixed.

        Thanks. Still doesn't shed light on why -> works and <- doesn't with the \" after the lastname.