KyleMassacre

Untitled

Oct 5th, 2013
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.89 KB | None | 0 0
  1. `stocks`.`stID` = UNIQUE stock id
  2. `stock_purch`.`st_p_uID`, = players id that purchased the stocks
  3. `stock_purch`.`st_p_id`, = the stock id that was purchased (stocks.stID)
  4. `stock_purch`.`st_p_qty`, = the quantity OF stocks purchased
  5. `stock_purch`.`st_p_worth`,  = the cumulative total OF money spent ON that particular stock
  6. `stock_locations`.`stLocPrice`, = the price OF the stock FOR that city
  7. `stock_locations`.`stLocId` = the location that stock will be displayed WITH (stLocPrice)
  8. FROM
  9.  `users`
  10.  LEFT JOIN
  11.  `stock_purch`
  12. ON
  13. `stock_purch`.`st_p_uID` = `users`.`id`
  14.  LEFT JOIN
  15.  `stocks`
  16. ON
  17. `stocks`.`stID` = `stock_purch`.`st_p_id`
  18. LEFT JOIN
  19.  `stock_locations`
  20. ON
  21. `stock_locations`.`stLocId` = `stock_purch`.`st_p_id`
  22. WHERE
  23.  `stock_purch`.`st_p_id` = `stock_locations`.`stockID` AND `stock_purch`.`st_p_uID` = ? AND `stock_locations`.`stLocId` = ?", $userId, CurrentPlayerLocation());
Advertisement
Add Comment
Please, Sign In to add comment