ho provato come dici tu,l'ho anche modificata
$querycart = "SELECT cart_id,cart_quantity FROM cart WHERE cart_userID='46'";
ma l'errore è lo stesso.