Hi i know its very simple but im stuck in this. Im fetching data by using join from database.. Now i got the values in array. i want to add these two value in a variable. Code is below..
$sql = "SELECT event_details.max_team_size FROM booking_details INNER JOIN event_details on booking_details.subcategory_id=event_details.id WHERE booking_details.`booking_id` = ".$booking_id." ";
$command = Yii::$app->db->createCommand($sql);
$array = $command->queryAll();
$array
has got the values like this..
Array
(
[0] => Array
(
[max_team_size] => 6
)
[1] => Array
(
[max_team_size] => 8
)
)
I want to add these two max_team_size
into a single variable and use that later to compare.