php - MySQL query or regexp find only pattern D, E, F -
My google-fu is failing me, if someone points me in the right direction that great for concept or words Will happen. / P>
I am trying to get the rows from a mysql database say that I have a variable equal to 'def' I example column, Example column, / pre> D, DEF, ED, EDF, FED /p> What you need is a user-defined function to see if the wire is match. Here is one: Now you'll get what you want: What do the functions take all the needle letters and see if they are present in the grass cover. Before checking the next needle, each needle is removed from the hedgehog, so you will not get doubles.
Prepare the Delimiter // Function Permit (Needle varchar (255), Haystack varchar (255)) Returns declare bool needles, position first_occurance int; Set needles_position = length (needle); While needles_position & gt; Set first_occurance = instr (haystack, substring (needle, needles-path, 1)); If first_occurance = 0 then false return; end if; Set greenstack = (choose contact (white (1, first_accurrence1), substrings (hastacks, first_corement + 1)); Set need_position = needles_position - 1; While the end; Back true; End //
choose example_column from your_table where permit (example_column, 'def');
Comments
Post a Comment