php - Searching String In All Tables And Displaying It With Pagination Technique -
my database has 5 tables:
computer|mobile|tablet|musicsystem|camera
all tables in same structure like:
productid|productbrand|price|userid
here, want search product's brand name in field of productbrand
in tables, userid=$userid
, limit 10 display pagination technique.
how can create such query in mysqli , display in php?
thanks in advance.
try this...
select * computer c,mobile m,tablet t,musicsystem ms,camera cam userid = $userid , (c.productbrand = searchingproductbrand or m.productbrand = searchingproductbrand or t.productbrand = searchingproductbrand or ms.productbrand = searchingproductbrand or cam.productbrand = searchingproductbrand ) limit 10
Comments
Post a Comment