primaryoldcall & secondaryoldcall might have callid no
fe.
Code:
callid primaryoldcall secondaryoldcall
==============================
2
3
4 3 2
5
6 3 3
I want to delete based on the callid = 4 and if the primaryoldcall or secondaryoldcall values are exists in callid then the callid data based on primaryoldcall or secondaryoldcall should be deleted.
in the above example..
I want to delete callid = 4 ..and it has primaryoldcall = 3 and secondaryoldcall = 2 ..
so .. in this condition .it must also delete callid = 3 and callid = 2 ..
any idea?
Code:
mysql> describe ev_callcontrol;
+------------------+------------+------+-----+------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------------+------------+------+-----+------------+----------------+
| ccid | int(11) | NO | PRI | | |
| cdate | date | NO | PRI | 0000-00-00 | |
| ctime | time | YES | | NULL | |
| seq | int(11) | NO | PRI | NULL | auto_increment |
| ccallid | int(11) | YES | | NULL | |
| primaryoldcall | int(11) | YES | | 0 | |
| secondaryoldcall | int(11) | YES | | 0 | |
| period | char(6) | YES | | NULL | |
| isdone | tinyint(1) | YES | | 0 | |
| isforcedone | tinyint(1) | YES | | 0 | |
+------------------+------------+------+-----+------------+----------------+
10 rows in set (0.04 sec)
mysql>
Bookmarks