CodeImp.Gluon.AgendaItem.SqlDelete C# (CSharp) Method

SqlDelete() public method

public SqlDelete ( ) : bool
return bool
        public bool SqlDelete()
        {
            if(id <= 0)
                throw new Exception("Item must have an ID assigned by the database!");

            string q = "DELETE FROM `agenda` WHERE `id` = '" + id + "' LIMIT 1;";

            General.DB.ConnectSafe();
            int result = General.DB.Update(q);
            General.DB.Disconnect();
            return (result == 1);
        }

Usage Example

Esempio n. 1
0
 // This removes an agenda item
 public bool RemoveItem(AgendaItem i)
 {
     return i.SqlDelete();
 }
All Usage Examples Of CodeImp.Gluon.AgendaItem::SqlDelete