I am having an issue when inserting a symbol more than once into the portfolio table.
I followed pset7 directions making both user_id and symbol as unique:
A neat way to impose this restriction after creating your table is to add a "joint key." After saving your table, click phpMyAdmin’s Structure tab for the table, then check both user_id and symbol, then click Unique to the right of With selected
ALTER TABLE `portfolios` ADD UNIQUE (`user_id` , `symbol` );
but I get the error if for example, another user has GOOG stock. It should only crash if the combination "user_id and symbol" is in the table, but not if only symbol is in the table.
Thanks!!