What is the proper way to do a an sql query in this case. For example: The only problem is sometimes they may not select bedroom, so we need to pull up all bedrooms and sometimes we need to pull up only 3 bedrooms. So bedrooms is sometimes empty.
$bedroom = $_REQUEST['bedroom'];
SELECT * FROM apartments WHERE bedrooms = '$bedroom'