02.10.2018, 19:00
Quote:
`SELECT * FROM table_name` will fetch ANY column. Do not use this unless you want to retrieve everything for a player.
There is `COUNT` aggregate function which returns a 0/1 in your case. You still execute 2 queries to check and update. All this can be done in 1 query using the keyword `IGNORE` and affected rows. Set the column for username as UNIQUE KEY and then execute your update query: pawn Код:
|