phpBB

Development Wiki

Umil.table row remove

From phpBB Development Wiki

umil::table_row_remove –– Remove a row in a database table using the Umil Library.

Description

string umil::table_row_remove ( mixed $table_name [, array $data ] )

Parameters

Parameter Required/Default Usage
table_name Required The name of the database table to remove. You may just use phpbb_ for the table prefix if you would like. UMIL correctly sets the table prefix to the board's default if you enter in phpbb_
data default array() An array of data you would like to search/match for to remove

Return Values

Returns result or umil_end data

This article is a stub. You can help in improving Olympus Documentation by expanding it.


Information

This function is only available in UMIL 1.0.0+

Examples

Example #1

Remove one row from the phpbb_test table

$umil->table_row_remove('phpbb_test',
    array(
        
'field1'  => 'old_value1',
        
'field2'  => 'old_value2',
    ),
);


This would be equivalent to:
DELETE FROM phpbb_test WHERE field1 = 'old_value1' AND field2 = 'old_value2';

See Also