in reply to (OT) Setting up a MySQL REGEXP in Perl

you need to change the ordering of the statement I believe..

$stmt = "SELECT * FROM teamnew WHERE lastname REGEXP '^$1|^$2|^$3' ORD +ER BY lastname";

cheers,

J

Replies are listed 'Best First'.
Re^2: (OT) (OT) Setting up a MySQL REGEXP in Perl
by bradcathey (Prior) on Jan 31, 2005 at 17:15 UTC

    edoc, thanks, that was it. I didn't think the order mattered, but by moving "ORDERED BY lastname" to the end of the statement, all was fine.


    —Brad
    "The important work of moving the world forward does not wait to be done by perfect men." George Eliot