fix Mixing of GROUP columns error
rewrite source code

improve source code for easy reading.
shorten insert/update active record.
rewrite source code

improve source code for easy reading.
change from sql query to active record
and shorten long insert/update active record.
rewrite source code

make source code easier to read.
shorten insert/update
fix bug db prefix

fix always db prefix, add check table name exists. (table.field)
rewrite source code
Merge branch 'master' of https://github.com/vee-bizidea/agni-cms into development

Conflicts:
	application/models/comments_model.php
Merge pull request #8 from ve3/development

Development