I keep receiving the following update error:
Could not update database because: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'between = 'some streets sdf', map = 'sdfjkdsdd', notes = 'Just
Can anyone tell me what difference they see from the second update statement from the first one? All I did was copy the update_residential function, paste it and renamed it update_land and passed it the correct variables. I have looked and looked at the syntax and don't see anything wrong with it.
This function works
function update_residential($id, $address, $city, $state, $mls, $style, $listPrice, $status, $subDiv, $schoolDist, $bed, $bath, $garage, $type, $taxes, $yrBuilt, $sqFt, $area, $source, $ext, $bsmt, $ac, $lot, $notes, $unit, $pic){
$sql = "Update residential Set address = '".$address."', city = '".$city."', state = '".$state."', mls = '".$mls."', style = '".$style."', listPrice = '".$listPrice."', status = '".$status."', subDiv = '".$subDiv."', schoolDist = '".$schoolDist."', bed = '".$bed."', bath = '".$bath."', garage = '".$garage."', type = '".$type."', taxes = '".$taxes."', yrBuilt = '".$yrBuilt."', sqFt = '".$sqFt."', area = '".$area."', source = '".$source."', ext = '".$ext."', bsmt = '".$bsmt."', ac = '".$ac."', lot = '".$lot."', notes = '".$notes."', unit = '".$unit."', pic = '".$pic."' Where id = $id LIMIT 1";
$update = mysql_query($sql) or die ('Could not update database because: ' . mysql_error());
}
This one I get the syntax error I stated above
function update_land($id, $mls, $listPrice, $leaseRate, $status, $address, $city, $state, $zip, $area, $acres, $pricePerAcre, $minAcres, $maxAcres, $landType, $propType, $lotSize, $between, $map, $notes, $pic){
$sql = "Update land Set mls = '".$mls."', listPrice = '".$listPrice."', leaseRate = '".$leaseRate."', status = '".$status."', address = '".$address."', city = '".$city."', state = '".$state."', zip = '".$zip."', area = '".$area."', acres = '".$acres."', pricePerAcre = '".$pricePerAcre."', minAcres = '".$minAcres."', maxAcres = '".$maxAcres."', landType = '".$landType."', propType = '".$propType."', lotSize = '".$lotSize."', between = '".$between."', map = '".$map."', notes = '".$notes."', pic = '".$pic."' Where id = $id LIMIT 1";
$update = mysql_query($sql) or die ('Could not update database because: ' . mysql_error());
}
I am at a total loss here.
Thanks in advance.