<?php
include '../includes/connection.php';

$business=$_SESSION['business_id'];
$branch=$_SESSION['branch_id'];


$bssett = "SELECT * from business_settings where branch_id='$branch' && business_id='$business'";
$bssettresult = mysqli_query($conn, $bssett);

if (mysqli_num_rows($bssettresult) > 0) {
    $gbusiness_settings=mysqli_fetch_array($bssettresult);
}else {
    mysqli_query($conn,"INSERT INTO business_settings(business_id,branch_id) VALUES('$business','$branch')");
    $gbusiness_settings=mysqli_fetch_array(mysqli_query($conn, "SELECT * from business_settings where branch_id='$branch' && business_id='$business'"));
    
}

?>
