Question about variables and curly brackets

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
kevinm
Posts: 10
Joined: 2013-10-31 09:31

Question about variables and curly brackets

Post by kevinm » 2019-05-12 07:56

I see from the examples in the support pages that some variables are enclosed in curly brackets, and some aren't. Is there a particular reason for this?

e.g $item_balance = sqlValue("select
sum(if(transaction_type in ({$positive_transactions}), quantity, -1 * quantity))
from transactions where item={$item}
");

and

if($memberInfo['group']!='Admins'){
$id=makeSafe($SelectedID);
$approved=sqlValue("select `approved` from `tablename` where `id`='$id'");

// if the record is approved, don't allow deleting it
if($approved) return FALSE;
}

Post Reply