0

I am not sure why this is not working, Its setting the flags perfectly but will not update events...

            if(isset($_REQUEST['del'])){
                            if($_REQUEST['del'] == 1){
                            $asset_id = $_REQUEST['assetID'];
            $sql = "UPDATE assets, events SET assets.del_flag=1 , events.del_flag=1
WHERE assets.id='$asset_id' AND events.asset_id='$asset_id'" or die(mysqli_error($mysqli));
if ( $mysqli->query($sql) ) {
      $addevent1 = "INSERT INTO events(title, desc, event_date, cust_id, asset_id) VALUES ('$asset_tag', 'Flagged an asset for Deletion', '$adddate', '$custID', '$id')" or die(mysqli_error($mysqli));
                $mysqli->query($addevent1);   
            $result = '<div class="alert alert-danger">Item Deleted</div>';
            }
              }
            }

do you see anything wrong?

1
Contributor
1
Reply
11
Views
3 Years
Discussion Span
Last Post by patk570
0

Fixed it, I forgot to encapsulate the desc in desc such an idiot sometimes...

Edited by patk570

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.