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 'and-aesthetics and session_id = "53t1ftm219ht496u5d2lmddc37"' at line 1: SELECT * FROM reservas WHERE propiedad_fk = commercial-premises-transfer-hairdressing-and-aesthetics and session_id = "53t1ftm219ht496u5d2lmddc37"