public static function destroy($id)
    {
        $table = self::getTableNameFromClass();

        self::getOne($id);

        $query = "DELETE FROM $table WHERE id = ".$id;

        try {
            Connection::db()->query($query);
            return true;
        } catch (Exception $e) {
            return false;
        }
    }
public static function destroy($id)
    {
        $table = self::getTableNameFromClass();

        self::getOne($id);

        $query = "DELETE FROM $table WHERE id = ".$id;

        try {
            Connection::db()->query($query);
            return true;
        } catch (Exception $e) {
            return false;
        }
    }
public static function destroy ( $ id ) { $ table = self :: getTableNameFromClass ( ) ; self :: getOne ( $ id ) ; $ query = "DELETE FROM $table WHERE id = " . $ id ; try { Connection :: db ( ) -> query ( $ query ) ; return true ; } catch ( Exception $ e ) { return false ; } }
Delete a record by id from the table in context
@param  id $id the id of the record to be deleted
@return [type]     [description]
Delete a record by id from the table in context