Z
Z
zhandosbai2015-06-24 21:12:30
PHP
zhandosbai, 2015-06-24 21:12:30

User region specifier for Yii, which one to choose?

Site on the Yii framework We
are developing a service for the selection of banking products. You need a script or some kind of service through which you can automatically determine the city (for Kazakhstan) of the user who logged in.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sanes, 2018-09-29
@Sanes

When writing, the table is locked.
https://habr.com/post/150075/

G
grinat, 2018-09-29
@grinat

As far as I understand, it's enough here:
UPDATE testbase SET count_clicks = count_clicks - 1 WHERE id = 1 AND count_clicks >= 0
In response, mysql should return an answer about how much the record was changed as a result of the query. If 1 means he is the first, if 0 is changed, then the counter is already negative and he is not the first.

D
Dmitry Bay, 2015-06-24
@kawabanga

www.yiiframework.com/extension/geoip

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question