{"id":1839,"date":"2014-02-27T00:34:59","date_gmt":"2014-02-27T05:34:59","guid":{"rendered":"http:\/\/www.rexfeng.com\/blog\/?p=1839"},"modified":"2014-02-27T00:34:59","modified_gmt":"2014-02-27T05:34:59","slug":"cross-database-joins","status":"publish","type":"post","link":"https:\/\/www.rexfeng.com\/blog\/2014\/02\/cross-database-joins\/","title":{"rendered":"Cross Database Joins"},"content":{"rendered":"<p>It turns out that joining tables between databases is not much harder than joining tables within the same database. With <a href=\"http:\/\/chrisshaw.wordpress.com\/2008\/07\/07\/cross-database-joins\/\">cross database joins<\/a>, it is really simple:<\/p>\n<p>[cc]<br \/>\nSELECT *<br \/>\nFROM database_one.table_one AS t1,<br \/>\ndatabase_two.table_two AS t2<br \/>\nWHERE t1.id = t2.id;<br \/>\n[\/cc]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It turns out that joining tables between databases is not much harder than joining tables within the same database. With cross database joins, it is really simple: [cc] SELECT * FROM database_one.table_one AS t1, database_two.table_two AS t2 WHERE t1.id = t2.id; [\/cc]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[1105,23,1106,1107,1103,1104],"class_list":["post-1839","post","type-post","status-publish","format-standard","hentry","category-tech","tag-cross","tag-database","tag-db","tag-join","tag-mysql","tag-sql"],"_links":{"self":[{"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/posts\/1839","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/comments?post=1839"}],"version-history":[{"count":1,"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/posts\/1839\/revisions"}],"predecessor-version":[{"id":1840,"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/posts\/1839\/revisions\/1840"}],"wp:attachment":[{"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/media?parent=1839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/categories?post=1839"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/tags?post=1839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}