protected static function doDelete($id)
    {
        $model = self::createModelInstance();
        $tableName = $model->getTableName($model->className);

        $connection = Connection::connect();

        $delete = $connection->prepare('delete from '.$tableName.' where id ='.$id);
        return $delete->execute() ? 'deleted successfully' : 'Row not deleted';

         
    }
protected static function doDelete($id)
    {
        $model = self::createModelInstance();
        $tableName = $model->getTableName($model->className);

        $connection = Connection::connect();

        $delete = $connection->prepare('delete from '.$tableName.' where id ='.$id);
        return $delete->execute() ? 'deleted successfully' : 'Row not deleted';

         
    }
protected static function doDelete ( $ id ) { $ model = self :: createModelInstance ( ) ; $ tableName = $ model -> getTableName ( $ model -> className ) ; $ connection = Connection :: connect ( ) ; $ delete = $ connection -> prepare ( 'delete from ' . $ tableName . ' where id =' . $ id ) ; return $ delete -> execute ( ) ? 'deleted successfully' : 'Row not deleted' ; }
Delete an existing row from the database

@param $id
@return string
Delete an existing row from the database