Jump to content

ardesigns

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Everything posted by ardesigns

  1. Basically, here is how the site would work: There's a table that holds each user's balance and a table of bids on the auction item. When a user bids on an item, the amount of money is immediately removed from their balance. When the user is outbid, they get their money back. Thus, only one user, the top bidder, has their money out at any one time. Each time there is a new bid, the PHP script will check who the previous high bidder was and return their money to their balance. My question is, if two people bid at roughly the same time, won't the PHP script return the previous top bidder's money twice (once for each simultaneous bidder)? Is there any way to prevent that? Thanks again (and let me know if I need to clarify further, I know this is kind of confusing and I'm not explaining it very well).
  2. Ok. That would be fine. How would I be sure to reimburse the previous highest bidder each time there's a higher bid. E.g., what if the current bid is 100 by Bidder A. Bidder B and C bid 110 and 120 respectively at roughly the same time. The PHP would reimburse Bidder A twice, and take both Bidder B and Bidder C's money, right? Or is such a situation so unlikely as to be frivolous?
  3. Hi. I'd like to create a simple auction website using PHP and MySQL. Users have been assigned a certain number of points (kept in a table called "people," each person is a row and the number of points is kept in a column). The way I envision it now, this is how it would work: There's a table called "auctions," each row is an auction. The highest bid is kept in a column, and the highest bidder's name is kept in another. When a person bids, the points are removed from their balance. When the highest bidder is outbid, the points are returned to their balance. Since the auctions will have a deadline/finishing time, my worry is that there will be a large influx of bidding at roughly the same time near the end of the auction, and the PHP/MySQL wouldn't be able to process it all at the same time. Is there any way to make sure that the script can handle multiple bids at roughly the same time? Thanks!
  4. Never mind, I figured it out. Thanks anyway.
  5. Hi. I have two tables, photos2011 and photos2012. The columns are: Photos2011 -id -first -last -filename2011 Photos2012 -id -first -last -filename2012 Both tables have several rows that overlap in columns first and last (but the ids may not be the same), and both have some rows that do not overlap with the other table. Also, the filename2011/filename2012 values are completely different for both tables, even when they correspond to the same first and last values. For example, 2 rows in photos2011 might be: id/first/last/filename2011 0/Bob/Smith/9hfsdf.png 3/John/Doe/jdsf234.png and in photos2012: id/first/last/filename2012 3/Bob/Smith/sdjf.jpg 4/Sarah/Jones/sdjf.jpg What I want to do, ultimately, is allow the user to search by last name (last), and to output a table that shows first name (first), last name, photos2011 (if one exists), and photos2012 (if one exists). I don't want any duplicate rows to appear. How can I use MySQL and PHP to do this? I have a good amount of experience with PHP and with MySQL, but only with simple MySQL tasks (insert, update, delete, and simple SELECT queries), so I haven't been able to figure out how to do this. Sorry if this is confusing, please let me know if I need to clarify something. Thanks!
  6. Try replacing that whole echo statement with this: echo '<img src="' . MM_UPLOADPATH . $row["picture"] . '" alt="' . $row["name"] . '" style="width:150px; maxheight=110px; margin: 5px; padding: 5px" /> <a href="pictures1.php?user_id=' . $row["user_id"] .'"> '. $row["name"] . '</a>';
×
×
  • 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.