Jump to content

Ajax with MySQL in PHP: display for Buyers and Sellers.


AnotherPoetsCry

Recommended Posts

I have a database that holds several 'users' each assigned a role as either a 'seller' or 'buyer'. Every seller must determine a 'pricePerObject'. I need a way collect the price from the sellers and to display that information to a 'buyer' and then allow this buyer to say how many objects he wishes to purchase from which sellers. at the end i must then be able to access all this information so I'm assuming I need to set up a Database to  hold all this info.

| User | Role | PricePerObject | NumberOfObjects |

Without knowing the number of users, how do I set up this program to collect all the users information and then display that to the buyer to collect his info and then do calculations? I'm pretty sure I'll need to use some form of ajax... but I'm not sure how or where?

Thank you!
Link to comment
Share on other sites

I'm hoping that you are using more than one table for that.
I'm seeing 3 [i]objects[/i] here,  users, things, and transactions.

[code]
#table users  ,  allows sellers to also be buyers
userID |  Role  |  email..|ect..

#table things, allows sellers to sell many things
thingID| sellerID | pricePerThing  | numberOfThings

#table transactions
transID  | sellerID | buyerID | thingID | agreedPricePerThing | negotiatedNumberOfThings
[/code]

Dig ?
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.