I would like to make my program display the order total/invoice

Advertisements Here is what ive done: food =["cheeseburger", "smallchips", "drink"] prices =[2.50, 1.50, 1] x=0 myorderfood=[] myordercost=[] print("Burgers\n") print("Menu:") print("Cheeseburger. Cost – $2.50 each") print("Small chips. Cost – $1.50 each") print("Drink – Cola only. Cost – $1.00 each\n") I want to display an invoice at the end once the user has completed there order showing… Read More I would like to make my program display the order total/invoice

SQL query deleting all rows instead of specific row

Advertisements foreach ($toRemove as $remove){ $sql = "DELETE FROM orders WHERE productId = :productId AND invoiceNo = :invoiceNo AND quantity = :quantity"; $stmt = $pdo1->prepare($sql); $stmt->bindParam(‘productId’, $remove[0], PDO::PARAM_INT); $stmt->bindParam(‘invoiceNo’, $invoice->invoiceNo, PDO::PARAM_INT); $stmt->bindParam(‘quantity’, $remove[1], PDO::PARAM_INT); $stmt->execute(); } $remove structure: [‘productId’, ‘quantity’] ‘productId’ is a string eg. ‘C-1’ I expected this query to only remove 1 row,… Read More SQL query deleting all rows instead of specific row

SyntaxError: Expected corresponding JSX closing tag for <Route> with react-router-dom v6

Advertisements I want my react app to have urls that look like localhost:3000/projects/construction and localhost:3000/services/landscape. The docs for react-router-dom say you can nest routes like so: function App() { return ( <Routes> <Route path="invoices" element={<Invoices />}> <Route path="sent" element={<SentInvoices />} /> </Route> </Routes> ); } Why then does my app fail with an Expected corresponding… Read More SyntaxError: Expected corresponding JSX closing tag for <Route> with react-router-dom v6