yTakkar / Instagram-clone

An Instagram-clone with my own flavors and features. Own the project with 5 simple steps!! 📸💝☢️ - No longer maintained.
MIT License
572 stars 250 forks source link

MySQL issue with variable name #27

Closed wazowski78 closed 7 years ago

wazowski78 commented 7 years ago

I have found this issue when calling this SQL request: SELECT MAX(login_id) AS get FROM login WHERE user_id = :id LIMIT 1

I have found that 'get' is a reserved instance, so I am getting errors using it, I have changed it for 'myget' in this way: SELECT MAX(login_id) AS myget FROM login WHERE user_id = :id LIMIT 1 and changed this row as well: $login = $row->myget;

It is possible someone are getting this error too.

yTakkar commented 7 years ago

Send a PR!!

yTakkar commented 7 years ago

And 1 more guy had this problem!!

yTakkar commented 7 years ago

OK. Solved it!!