On Friday 25 July 2003 02:02 am, Fred van Engen wrote: > > $sql = "SELECT Realtor, HouseAddress, Bathrooms, > > Bedrooms, YearBuilt, Garage, Location, Basement, Info > > FROM properties WHERE Bathrooms =='".$a."'", "Bedrooms > > =='".$b."'", "Garage =='".$c."'", > > "Basement =='".$d."'"; > > Use = for equality tests in MySQL, not == like in most > programming languages.
Yes, that's probably what's causing the error. Let me just add, for the sake of better readability, that there's no need for the concatenation. In PHP, you can embed your variables inside a double-quoted string (even inside single quotes if they are inside double quotes): ...WHERE Bathrooms = '$a', Bedrooms = '$b', Garage = '$c', Basement = '$d'"; and for numeric values you don't even need the single quotes: ...WHERE Bathrooms = $a, Bedrooms = $b, ... although best practises (which I'm still learning) may recommend their use anyway. --John -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]