@@ -149,7 +149,7 @@ $app->get('/order/{id}', function (Request $request, Response $response, array $ | |||
$db = new DB(); | |||
// detail orderlijnen | |||
// detail orderlijnen, steek in src | |||
$sql = "SELECT * FROM order_lines o LEFT JOIN products p on o.product_id = p.id where o.order_id = " . $args['id']; | |||
$stmt = $db->prepare($sql); | |||
$res = $stmt->execute(); |
@@ -0,0 +1,13 @@ | |||
<?php | |||
namespace Shop\DB; | |||
use Shop\DB\DB; | |||
class ClientOrder extends DB { | |||
public function showcart(){ | |||
$stmt = $this->prepare("SELECT * FROM order_lines o LEFT JOIN products p on o.product_id = p.id where o.order_id"); | |||
$res = $stmt->execute(); | |||
return $res;} | |||
} | |||
//vergeet args niet zie index route order/id |