Skip to content

Instantly share code, notes, and snippets.

@hideki-a
Created September 21, 2019 21:27
Show Gist options
  • Save hideki-a/4d5b19153bfa08a530c85eb35c373dea to your computer and use it in GitHub Desktop.
Save hideki-a/4d5b19153bfa08a530c85eb35c373dea to your computer and use it in GitHub Desktop.
リレーションのロード
<?php
$terms = ['rev_type' => 0, 'status' => 4];
$join_stmt = ['name' => 'categories', 'from_obj' => 'entry', 'to_id' => 1];
$args = ['join' => ['relation', ['entry_id', 'from_id'], $join_stmt ] ];
$entries = $db->model('entry')->load( $terms, $args );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment