SQL work ( Part:1 )

Signed-off-by: https://github.com/Infinity-420 <iceis2@hotmail.com>
SQL: Massive sql fix and ect
( part:2 )

Signed-off-by: https://github.com/Infinity-420 <iceis2@hotmail.com>