Table::where('column', 'LIKE', 'Port%'); // % represents any characters for any numbers (like * in regex)
Jun 29, 2022
4
Level 5
Group using wildcards
Hi everyone!
I've a table in my DB called feeds .
The feeds have names..
Meanwhile , I've a templates table that contains values which are tags or indexes I use for search and grouping!
For example one template could include the following values :
1:south_stand, 2:Gate$
1:south_stand, 2:Switch_3 3:Port$
The $ replaces digits
so periodically I've to loop through the templates and form groups according to the values set!
One of the results could be the following :
South Stand Gate 1
South Stand Switch 3 Port 1
South Stand Gate 2
South Stand Switch 3 Port 2
...etc according to the template I'm setting!
Is it possible to implement that using SQL wildcards ? and how can I do the grouping ? Thanks!
Please or to participate in this conversation.