Jump to content

retrieval problem


suki2shoes

Recommended Posts

Hi.

my website uses a session_id and sends this to my mysql database along with the details of the products the customer buys.

When i'm using a query to echo the products the customer has bought, they are being called using $last_id = mysql_insert_id(); and the session id.

therefore i am wondering as all the products are called using the session_id, if there is a way i can distinguish between between products to do calculations on the individual price or just simply display the data in a table.


[a href=\"http://pastebin.com/632612\" target=\"_blank\"]http://pastebin.com/632612[/a] - sql call
[a href=\"http://pastebin.com/632619\" target=\"_blank\"]http://pastebin.com/632619[/a] - sql insert queries

if you see in the file above, i want description and price to go of each product to go into seperate rows, but becauase the call is on session_id they go into the same row.
i know there probably easier ways like storing my values in arrays or osmething, but i'm novice and this is how i've done it now .

Thanks for help in advance.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.