I have a script that geocodes physical addresses and puts it into a MySQL database with two columns: coord_lat
and coord_long
. These are float
type columns but unfortunately some addresses don't get geocoded correctly and the script tries to push the address as a null
value into the database which then breaks the script because the database cannot hold a null
value.
I'm trying to find a way I can rewrite my script to determine if the geocoded address comes out to a null
value to automatically rewrite that value to 0
so that the database and script don't break.
Can anyone give me some advice on switching/replacing a null
values to 0
?