My problem is about extraction from my Mysql DB.
In my DB I have inventory Process from Computer. Here is an example of line in my DB.
ID CMD PID PPID
1000 /usr/sbin/httpd 9260 12600
1001 /usr/sbin/httpd 9261 12600
1002 /usr/sbin/httpd 9262 12600
1003 /usr/sbin/httpd 9263 12600
1004 /usr/sbin/httpd 12600 50
OK, I want to only select the line :
1004 /usr/sbin/httpd 12600 50
Actually my code PHP select the 5 lines.
But now I want to put a php code for selecting the CMD which not created by Parent Process between them. In the example the line with PPID 50 is the good one, her parent process is not here.
I really don't know what I can make, but that is my example.
SELECT ID, CMD
WHERE cmd LIKE %httpd% AND IF ppid IS NOT EQUAL TO OTHER ppid WHICH HAVE THE SAME cmd;
I hope you can help me. Sorry my problem is complicated, I am bad for explain it.