Tag: JOIN query
-
Post Views: 20 1. Table TABLE_A is in the A database, and the table TABLE_B is in the B database. The two tables are linked together via columns table_a.id , table_b.table_a_id . 2. Refer to the advanced JOIN statement:https://learnku.com/docs/laravel/6.x/queries/5171#211e4f. Reference:https://stackoverflow.com/questions/41423603/join-two-mysql-tables-in-different-databases-on-the-same-server-with-laravel-elo. as shown in Figure 1 3. The final code is as follows 4. The final generated SQL is as follows,…
-
Post Views: 21 1. The current requirements are as follows. Based on the time range of article publishing, it is necessary to filter account rankings based on the number of articles published. as shown in Figure 1 2. View the method file of the obtained account list, the code is as follows 3, gethttp://api.channel-pub-api.localhost/v1/channel-app-sources?group_id=015ce30b116ce86058fa6ab4fea4ac63&sort=-channel_app_task_count。Sometimes, when connecting two tables, you may…
-
Post Views: 16 1. Main table: CPA_CHANNEL_APP_TASK and Schedule: CPA_Task: many-to-one. as shown in Figure 1 2, table: cpa_task and Table: CPA_baijia_article|cpa_customize_article|cpa_douyin_article|cp a_netease_article|cpa_qq_article|cpa_weibo_article|cpa_wx_article The association relationship: one-on-one. Table: A record in cpa_task will only exist in Table: CPA_baijia_article|cpa_customize_article|cpa_douyin_article|cp a_netease_article|cpa_qq_article|cpa_weibo_article|cpa_wx_article in one of the tables. As shown in Figure 2, Figure 3, Figure 4 3. Table: CPA_baijia_article|cpa_customize_article|cpa_douyin_article|c PA_Netease_Article|CPA_QQ_Article|CPA_Weibo_Article|CPA_WX_Article…
