Silently failed on bad placed real_escape_string

Tried to test your code, but It wasn't working, so added a check for the return value from $dao->insert.
and noticed it return false, as the real_escape_string was missplaced and escpaed even the real quotes.