If you are using at least MySQL version 4.0 and your tables are of type innodb, you can use foreign keys with cascading. To alter your current tables you would issue the following queries:
ALTER TABLE `table_one` TYPE = innodb;
ALTER TABLE `table_two` TYPE = innodb;
followed by:
ALTER TABLE `table_two` ADD FOREIGN KEY ( `indexno` ) REFERENCES `table_one` ( `indexno` ) ON DELETE CASCADE
to turn on cascading.
I believe this means indexnoin table_onehas to be the primary key for indexno to be a foreign key for table_two.
Now, when a record in table_oneis deleted, records with a corresponding indexno in table_twoare automatically cleaned up (deleted.)