You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'for-sale and session_id = "pa3ri47opp9r6h3bmcj0m0mjq6"' at line 1: SELECT * FROM reservas WHERE propiedad_fk = apartments-for-sale and session_id = "pa3ri47opp9r6h3bmcj0m0mjq6"