I'm trying to use the print_delete_confirmation function, but can't seem to get it work.
Per the vbulletin API, I've learned that it uses 8 inputs as such:
Quote:
Prints a dialog box asking if the user is sure they want to delete the specified item from the database
void print_delete_confirmation (string $table, mixed $itemid, string $phpscript, string $do, [string $itemname = ''], [mixed $hiddenfields = 0], [string $extra = ''], [string $titlename = 'title'])
* string $table: Name of table from which item will be deleted
* mixed $itemid: ID of item to be deleted
* string $phpscript: PHP script to which the form will submit
* string $do: 'do' action for target script
* string $itemname: Word describing item to be deleted - eg: 'forum' or 'user' or 'post' etc.
* mixed $hiddenfields: If not empty, an array containing name=>value pairs to be used as hidden input fields
* string $extra: Extra text to be printed in the dialog box
* string $titlename: Name of 'title' field in the table in the database
|
Based on the above, I've created the following:
PHP Code:
print_delete_confirmation('table', $variable, 'phpscript', 'dorequest', 0, '', 'Delete Comment', 'column2' );
My Table includes both an ID column and the column2 column. Yet attempts to use the function keep giving an sql error. And I noticed the attempted query is always something like "SELECT tableid, column2"
I assume that the 'id' is automatically added by the function. But it appends it to table like it does, I don't know.
Does anyone have any ideas or can lend any help or advice?