mercredi 29 juin 2016

How to code basic search in my website in php

I want to code a basic search box in my php based online shopping website. the problem is the data is in 50 tables categorised based on product type. ie table 1 - Mobile Phones table 2 - Laptops table 50 - Air Conditioners

i can code it using query like select * from table 1 if 0 rows returned select * from table 2 if 0 rows returned next till table 50

but this code can slow down the website as each keypress will lead into 100 queries execution is there anything else i can do about it ?




Aucun commentaire:

Enregistrer un commentaire