I've run into a problem where I cannot go any longer on my own. I currently have a database which basically lists my cellphone with different applications on it.
The applications are listed with the status within the same database column which means that i separate the application from the status with a ";" and i separate the different applications with a ",".
Example :
ipboard,4.83->6.3,Running;testAcap,6.9-0,Stopped;
ipboard,2.3333->5.366,Stopped;Videostream,1.2,Stopped;
Now, how would i go about finding all the ipboards that currently as an app is stopped? As you see, the string before the status can vary in lenght due to the different versions. And I do not want a list of everything that is stopped, just the ipboard in this case.
My crappy query so far that selects all strings with ipboard in them at all(All of them doesnt have it) :
select *
from acaps
where acaps like '%ipb%'
For me the next logical thing to do would be something like :
select *
from acaps
where acaps like '%ipb%'
and subshitblabla where "Stopped" after the "," after the ipboard string.
Anyone knows how to get this working?
Thanks everyone for shown interest. Found a sollution that works for me, posting here as reference for others.
SELECT * FROM `acaps`
where acaps REGEXP '(ipboard)[,][0-9\-\>\.]*[,](Stopped)\;.*'