making the much needed user profile api
This commit is contained in:
parent
8442b362b7
commit
f76da3335a
3 changed files with 229 additions and 25 deletions
|
|
@ -237,6 +237,36 @@ sub commit {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 deleteRow ( table, key, keyValue [, dbh ] )
|
||||
|
||||
Deletes a row of data from the specified table.
|
||||
|
||||
=head3 table
|
||||
|
||||
The name of the table to delete the row of data from.
|
||||
|
||||
=head3 key
|
||||
|
||||
The name of the column to use as the key. Should be a primary or unique key in the table.
|
||||
|
||||
=head3 keyValue
|
||||
|
||||
The value to search for in the key column.
|
||||
|
||||
=head3 dbh
|
||||
|
||||
A database handler to use. Defaults to the WebGUI database handler.
|
||||
|
||||
=cut
|
||||
|
||||
sub deleteRow {
|
||||
my ($self, $table, $key, $keyValue, $dbh) = @_;
|
||||
WebGUI::SQL->write("delete from $table where ".$key."=".quote($keyValue), $dbh);
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 errorCode {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue