This is my table and data of each table
Table reservation
:
+------------------+--------- +---------+
| rid | r_date | r_time |
+------------------+--------- +---------+
| 1 | 2019-12-20| 10:00:00|
| 2 | 2019-12-20| 10:00:00|
| 3 | 2019-12-20| 10:00:00|
+------------------+-----------+---------+
Table combo
:
+------------------+---------------+------------+
| combo_id | combo_name | combo_price|
+------------------+---------------+------------+
| 1 | Package 1 | 250.00 |
| 2 | Package 2 | 250.00 |
| 3 | Package 3 | 250.00 |
+------------------+---------------+------------+
I want to get the combo_name from combo table to reservation table and should look like this
+-------------+-----------+---------+------------+
| rid | r_date | r_time |combo_name |
+-------------+-----------+---------+-----+------+
| 1 | 2019-12-20| 10:00:00| Package 1 |
| 2 | 2019-12-20| 10:00:00| Package 2 |
| 3 | 2019-12-20| 10:00:00| Package 3 |
+-------------+-----------+---------+-----+------+
this is my code pls help
$query = mysqli_query($con, "select *
from reservation
where r_status='Approved'
and r_date>='$today'
order by r_date"
) or die(mysqli_error($con))`;