$STH = $DBH->prepare("SELECT action FROM action WHERE action = '$action'") ;
Writing SQL can get pretty silly after a while.