SmtC: Show me the Code
Ole Peter Smith
Instituto de Matemática e Estatística
Universidade Federal de Goiás
http://www.olesmith.com.br

SQL
Whom takes fun only as fun.
And serious only seriously.
Misunderstood both.
Piet Hein

DELETE

DELETE FROM
table_name
WHERE
Name like 'Ole%';
PHP Listing: Delete.php.
    //*
    //* Deletes $item (assoc array) to DB table $table, if needed.
    //* 

    function Sql_Delete_Items($where,$table="")
    {
        if (empty($where))
        {
            $this->Warn("Covardly refusing to delete with empty where clause: ",$where);
        }

        $res=FALSE;
        if ($this->Sql_Table_Exists($table))
        {
            $query=$this->Sql_Delete_Items_Query($where,$table);
            
            $res=$this->QueryDB($query);
            if ($this->Sql_Delete_Log)
            {
                $this->Sql_Log_Query($query,$res);
            }
        }
        
        return $res;            
    }

    //*
    //* Deletes $multiple items, according to $where.
    //* 

    function Sql_Delete_Items_Query($where,$table="")
    {
        if (is_array($where)) { $where=$this->Hash2SqlWhere($where); }
        
        return
            "DELETE FROM ".
            $this->Sql_Table_Name_Qualify($table).
            " WHERE ".
            $where;
    }
Messages:
0 secs.