mysql_real_escape_string doesn't work in 5.4 and above.
Merge branch 'master' of ssh://git.manifestwebdesign.com:22/dabl
fix issue with query total function