Retrieve a different ID on insert than [Insert_ID]
I have what I hope is a simple question. How can I retrieve a different ID than the:
$InsertGoTo = "assets_detail2.php?id=[Insert_ID]";
The assetID is populated based on a recordset for that Asset.
How can I retrieve and replace the [Insert_ID] with AssetID
<?php
if (isset($_POST["Insert"]) || isset($_POST["Insert_x"])) {
$InsertQuery = new WA_MySQLi_Query($MKTG_DB);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "asset_comments";
$InsertQuery->bindColumn("UserID", "d", "".((isset($_POST["UserID"]))?$_POST["UserID"]:"") ."", "WA_ZERO");
$InsertQuery->bindColumn("AssetID", "d", "".((isset($_POST["AssetID"]))?$_POST["AssetID"]:"") ."", "WA_ZERO");
$InsertQuery->bindColumn("inCommentStatus", "d", "".((isset($_POST["inCommentStatus"]))?$_POST["inCommentStatus"]:"") ."", "WA_ZERO");
$InsertQuery->bindColumn("inCompanyID", "d", "".((isset($_POST["inCompanyID"]))?$_POST["inCompanyID"]:"") ."", "WA_ZERO");
$InsertQuery->bindColumn("txtComments", "s", "".((isset($_POST["txtComments"]))?$_POST["txtComments"]:"") ."", "WA_BLANK");
$InsertQuery->saveInSession("WADA_Insert_asset_comments");
$InsertQuery->execute();
$InsertGoTo = "assets_detail2.php?id=[Insert_ID]";
if (function_exists("rel2abs")) $InsertGoTo = $InsertGoTo?rel2abs($InsertGoTo,dirname(__FILE__)):"";
$InsertQuery->redirect($InsertGoTo);
}
?>
Thank you!!!!!!!!
Robert
