M
|
morpheus author 7/17/2007 |
After my last post I tried this in after add and got an error |
J
|
Jane 7/17/2007 |
Hi, global $conn; $str2 = "select LAST_INSERT_ID() from `items`"; $rs2 = db_query($str2,$conn); $data2 = db_fetch_numarray($rs2); $_SESSION["last_inserted_row"]= $data2[0]; //code to get the location selected from the last inserted record $str6 = "select location from items where uniqueid = $_SESSION["last_inserted_row"]"; echo $str6; $rs6 = db_query($str6,$conn); //code to lookup the default status for the location selected above $str3 = "select defstatus from adminstatus where location = $rs6"; echo $str3; $rs3 = db_query($str3,$conn); //code to update the status of the last added record with the status obtained from the adminstatus table $str4 = "update set status = $rs3 where uniqueid =$_SESSION["last_inserted_row"]"; echo $str4; $rs4 db_query($str4,$conn); ... |