Dear Xperts,
In my database table some fault code type records are inserted and the values are like bellows:
Error:2/FC:10; 00:15:13 16/03/2009;
Error:2/FC:20; 00:15:15 16/03/2009;
Error:2/FC:30; 00:15:16 16/03/2009;
Error:2/FC:40; 00:15:20 16/03/2009;
Error:3/FC:3; 00:20:13 16/03/2009;
Error:3/FC:6; 00:20:15 16/03/2009;
Error:3/FC:9; 00:20:16 16/03/2009;
Error:3/FC:12; 00:20:25 16/03/2009;
Error:3/FC:15; 00:20:23 16/03/2009;
Error:3/FC:18; 00:20:26 16/03/2009;
The database values contains in the following variables:
$error_name[]= row[‘$db_error_name’]; // contains all the values of 1st column
$error_time[]= row[‘$db_error_time’]; // contains all the values of 2nd column
I need an SQL query/PHP statement order by same Error code(Error:2/ Error:3 )so that I can print the following output in page when it occurs at the same time (time format: hh:mm only; ex: 00:15/00:20).
Note: Same Error code(Error:2/Error:3) types FC numbers have to count when it occurs at the same time (hh:mm dd/mm/yy).
Output:
4 Fault(10,20,30,40)found // under Error:2 & time 00:15 16/03/2009;
6 Fault(3,6,9,12,15,18)found //under Error:3 & time 00:15 16/03/2009;
I am waiting for your kind valued reply.
Regards
AHMURAD