What you've done there is merely mask a problem you've got in the integrity of the data in your database.
You've clearly got broken relationships between your customers, customers_info, and address_book tables. This is ALWAYS caused by importing data incorrectly and/or manually fiddling with data in the database.
You should really fix your database integrity problems instead of merely masking them.



