This -
$updateRow= CS50::query("UPDATE portfolios SET shares =[$newAmount] WHERE user_id = ? AND symbol = ?", $myid , $_POST['buysym']); -
results in this -
Fatal error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[14] WHERE user_id = '11' AND symbol = 'QUAD'' at line 1 in /home/ubuntu/workspace/pset7/vendor/library50-php-5/CS50/CS50.php on line 352
$newAmount=14 user_id=11
Any ideas as to what I am doing wrong? Thanks.