php - yii, show records from different tables with same structure -


ok, thing making setup wordpress multisite setup using yii

so, here instead of site, have "shops" there super admin creates shops, each shop has own table of products "shop_1_product", "shop_2_product", ..and on now, if shop owners want see list of products there individual tables, easy using cactiverecord/models

but stuck super user(who creates shops), wants see list of products each table .there different products in each table no row duplication, little in stuff, appreciated :)

approaches thinking:

->1 using native php data each table collectively. or -> like, init model, table name, , records using model()->findall , re-init same model different table name, if thats possible? on how re-init please. :)

you should able create big query , use data provider. http://www.yiiframework.com/doc-2.0/yii-db-query.html#union()-detail

i did in yii1, search on different models. should little easier because tables should have same format.

i have similar setup in application decided keep 1 table of products shops, each product can in 1 or more shops etc.


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -