MySQL help
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
I will start by pointing out that the second query is syntactically correct but logically wrong. You are selecting the literal string "phone" rather than the value in the column.

You could also write it much simpler just by adding 42455 and the player count together. If the count is 0 then the number will be 42455, if the count is 1 it will be 42456, and so on. Don't even need any other queries.
I was trying to figure out how to select the value.

The thing is if a player doesn't buy a phone before the next player it could lead to two or more players having the same phone number.
Reply


Messages In This Thread
MySQL help - by Onfroi - 05.01.2017, 23:09
Re: MySQL help - by Vince - 05.01.2017, 23:52
Re: MySQL help - by Onfroi - 06.01.2017, 00:17
Re: MySQL help - by Spmn - 06.01.2017, 00:45
Re: MySQL help - by Onfroi - 06.01.2017, 00:56

Forum Jump:


Users browsing this thread: 3 Guest(s)