开发者

What to put into lat/lng db fields if lat/lng are empty?

开发者 https://www.devze.com 2023-03-26 03:19 出处:网络
I have a mysql insert state开发者_如何学Goment that breaks when the system can\'t get lat/lng for a user.

I have a mysql insert state开发者_如何学Goment that breaks when the system can't get lat/lng for a user. The sql loos like this:

INSERT INTO users(user_email, first_name , last_name , lat , lng ) values ( 'name'
 , 'email' ,  ,  );

What should I put into the lat/lng so that it doesn't break the insert statement like this? Should it be nulls? That seems kind of inappropriate to put nulls, no?


Null is allowed if the table definition allows it. Null lat/long might mean that the user's location is unknown

0

精彩评论

暂无评论...
验证码 换一张
取 消