You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$mysqli = new PDO("mysql:host=localhost; dbname=ecommerce_music", "root", "");
$query = "SELECT * FROM songlist INNER JOIN product ON product.songId=songlist.id INNER JOIN order_has_products ON order_has_products.idProduct=product.productId WHERE order_has_products.idOrder=$userId";
$statement = $mysqli->prepare($query);
$statement->execute();
while($row = $statement->fetch(PDO::FETCH_ASSOC))
{
$data[] = $row;
}
//Need to add JSON_NUMERIC_CHECK to avoid number being treated as strings