Please edit your code in as text. I shouldn't have to type that in myself.
– DrewDec 03 '16 at 05:45
n MySQL, you can't modify the same table which you use in the SELECT part. Look in to the below link..
http://dev.mysql.com/doc/refman/5.6/en/update.html
For the alternative approach go to the below link:
http://stackoverflow.com/questions/45494/mysql-error-1093-cant-specify-target-table-for-update-in-from-clause
– khaled4vokalzDec 03 '16 at 05:54