ensuring that WHERE or AND is correctly used in "$extra_sql" snippit - FS RT #884