dbDeleteRowGoAhead WebServer APIGoAhead EMF

Synopsis

Removes a given row from a database table.

Prototype

 #include "emfdb.h"

 int dbDeleteRow(int did, char_t* table, int rid);

Parameters

diddatabase id returned from a previous dbOpen
tabletable name that contains the row being deleted
ridrow number that will be deleted from the table

Description

Deletes and frees one row. All rows shift accordingly to the deletion.
Note: Does not actually delete the row; only the contents of the row are deleted.

Return Value

dbDeleteRow returns 0 upon success, or -1 upon error.

Example

if (dbDeleteRow(did, "detector", row) < 0) {
	Error(wp, 200, "Cant delete detector row");
	return;
}

See Also