Return user id from phone_number
GET_USER_ID = "SELECT user_id FROM user WHERE phone_number = {};"
I am trying to run the above query and got this error :
InternalError: (1366, u"Incorrect integer value: 'SELECT user_id FROM user WHERE phone_number = 0400001122;' for column 'user_id' at row 1")
When i run the query in the mysql workbench, it works fine and returns the correct user_id
. I have been researching other posts as well, but most of them are insert problems and a null value for them would fix this in INSERT
cases.
However, I am doing a SELECT
query.
I have been struggling alot with this error, could anyhow help me out?