safemysql
safemysql copied to clipboard
Remove redundant code and fix phpDoc
- Method
rawQuery()
can't return false because methoderror()
can't return any result (it throws an exception or triggers error); - As
rawQuery()
always returns truthy valueif ($res = $this->rawQuery())...
construction is no sense; -
mysqli_fetch_array()
can't return FALSE. It returns array or NULL; - As
fetch()
returns array or NULLgetRow()
also returns array or NULL; -
getOne()
doesn't free resultset if the query have empty result (not sure if it's bad, but I think it might be better if we clean all resources after method calling).
It seems point 5 (about getOne()
) solves https://github.com/colshrapnel/safemysql/issues/46