Id is missing in session response

I have resolved this particular error due to not having a query initially in SC to identify the ID in an array named lineItems. It was in one tutorial but not in another. Unfortunately it has now developed another error stating incorrect sql syntax and cannot send checkout in. I have made another post regarding this.