Guest Posted July 22, 2007 Share Posted July 22, 2007 Let's say I have several orders in the DB. I delete an order in the admin panel and it asks "Are you sure". I click OK and the page refreshes, and it says "There are no orders in the database." The link in the address bar is, for example "orders/?delete=070722-153950-4478&customer_id=7" If I refresh the above link, I get the same message that no orders exist. It does actually delete the order but I have to click on the 'Orders' button in the left nav and it shows me all my orders again. No I've narrowed it down to this piece of code: $sqlQuery = ""; if(isset($_GET['oid']) && !isset($_GET['delete'])){ $sqlQuery = "WHERE cart_order_id = ".$db->mySQLsafe($_GET['oid']); } elseif(isset($_GET['customer_id']) && $_GET['customer_id']>0){ $sqlQuery = "WHERE ".$glob['dbprefix']."CubeCart_customer.customer_id = ".$db->mySQLsafe($_GET['customer_id']); // } When I remove the above code, everything works as it should Can anyone explain to me what this code does? I can't just remove it! Many thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.