Skip to content

Instantly share code, notes, and snippets.

@mkdesignn
Created April 19, 2018 09:42
Show Gist options
  • Select an option

  • Save mkdesignn/b0634f37598c7b2bbbf0eef5ad8066df to your computer and use it in GitHub Desktop.

Select an option

Save mkdesignn/b0634f37598c7b2bbbf0eef5ad8066df to your computer and use it in GitHub Desktop.

Revisions

  1. mkdesignn created this gist Apr 19, 2018.
    14 changes: 14 additions & 0 deletions getBranch
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    function getBranch($belief_id){

    $con = DBINT::DBCon();

    $qry = "SELECT branch.idbranch, branch.branchname from worldviews inner join branch on branch.idbranch = worldviews.branchid where beliefid = ".$belief_id.' group by branchid';
    $stmt = $con->prepare($qry);
    $stmt->execute();
    $result = $stmt->setFetchMode(PDO::FETCH_ASSOC);
    $r = $stmt->fetchAll();
    $con = null;

    return $r;

    }