Working on sell.php now. Trying out Sell, I naturally find the need to replenish shares of some stock after selling, for testing purposes. When I try to manually insert, like instructions said to do in Portfolio, I enter appropriate user_id, symbol and number of shares. And then nothing happens when I refresh that user's portfolio. Also, noticed that my IDs in Portfolio table are not incrementing consecutively.

  • How are you inserting rows? If you do it as laid out in the video, then it should work. And do you have the auto increment option ticked when you set ID as primary key?
    – ronga
    Oct 25, 2016 at 2:17

1 Answer 1


I hadn't actually watched the video, so thank you, ronga, for your suggestion. I should slow down and review all the information provided before becoming frustrated at my inability to solve a problem.

I dchange my "Portfolio" table by getting rid of "user_id," which I found was unncessary, instead just using "id," "symbol," and "shares," making "id" and "shares" a joint key. I also had to change some of my queries to "Portfolio" in a couple of my controllers, making sure superglobal variable "$_SESSION" referenced "id" in "users" table and not "user_id" in "Portfolio" table. Oops.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .