mysql – How to select multiple columns to query with regexp?

I would like to select columns 1 and 2 of a table if columns 3 and 4 have the value & # 39; x & # 39; and & # 39; y & # 39; and at the same time have the columns 5 O 6 contain specific text. Also, I just want to select a specific range of results and finally by date.

For that I do the following (which obviously failed because something is wrong):

$ u = strtoupper ($ this-> text);
$ l = strtolower ($ this-> text);

$ this-> query = "Select COLUMN1, COLUMN2 from NobreTable where
COLUMN3 =? X & # 39; AND COLUMN4 = & # 39; y & # 39;
AND (COLUMN5 OR COLUMN6) regexp & # 39; l $ $ u & # 39;
LIMIT # 10 & # 39; OFFSET & # 39; 0 & # 39;
ORDER BY DATE ";

I think what's missing is this part of the query:

AND (COLUMN5 OR COLUMN6) regexp & # 39; l $ $ u & # 39;

Although I'm not sure.

Does anyone know how to do it right?