Help with Phone Numbers
#2

If you have a separate table for phone numbers:
pawn Код:
INSERT IGNORE INTO ... (...) VALUES (...)
or in the same table use UPDATE query but set phone number column as UNIQUE KEY.
pawn Код:
UPDATE IGNORE SET ..
To either of the two, set a callback in mysql_tquery and then check affected rows: https://sampwiki.blast.hk/wiki/MySQL#cache_affected_rows
If it inserts a new record or updates a record, it will affect 1 row. If it is 0, a mobile already exists so return an error to the player.
Reply


Messages In This Thread
Help with Phone Numbers - by ImTobi - 31.07.2018, 06:13
Re: Help with Phone Numbers - by Calisthenics - 31.07.2018, 08:18
Re: Help with Phone Numbers - by ImTobi - 31.07.2018, 08:37
Re: Help with Phone Numbers - by Calisthenics - 31.07.2018, 09:10
Re: Help with Phone Numbers - by ImTobi - 01.08.2018, 04:15
Re: Help with Phone Numbers - by GTLS - 01.08.2018, 05:03
Re: Help with Phone Numbers - by Calisthenics - 01.08.2018, 07:55
Re: Help with Phone Numbers - by ImTobi - 03.08.2018, 00:00
Re: Help with Phone Numbers - by ImTobi - 03.08.2018, 00:05
Re: Help with Phone Numbers - by ImTobi - 05.08.2018, 17:34
Re: Help with Phone Numbers - by ImTobi - 09.08.2018, 09:27
Re: Help with Phone Numbers - by ImTobi - 18.08.2018, 13:26
Re: Help with Phone Numbers - by m4karow - 18.08.2018, 13:31
Re: Help with Phone Numbers - by XStormiest - 18.08.2018, 13:47
Re: Help with Phone Numbers - by Logic_ - 18.08.2018, 17:50
Re: Help with Phone Numbers - by Calisthenics - 18.08.2018, 18:35

Forum Jump:


Users browsing this thread: 5 Guest(s)