Skip to content

Instantly share code, notes, and snippets.

@mkdesignn
Created April 19, 2018 09:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkdesignn/b0634f37598c7b2bbbf0eef5ad8066df to your computer and use it in GitHub Desktop.
Save mkdesignn/b0634f37598c7b2bbbf0eef5ad8066df to your computer and use it in GitHub Desktop.
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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment