Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Databases

Stu Parker
Stu Parker
4,814 Points

Need some help with extra curricula code

Can someone let me know where this is not viable as it is creating a syntax error

$stmt = $conn->prepare("UPDATE bfl SET gamerid="?", name="?", age="?",location"?", email="?", console="?"WHERE team="?" ");

$stmt->bindParam(1, $gamerid); $stmt->bindParam(2, $name); $stmt->bindParam(3, $age); $stmt->bindParam(4, $location); $stmt->bindParam(5, $email); $stmt->bindParam(6, $cosole); $stmt->bindParam(7, $team);

$stmt->execute(array($gamerid,$name,$age,$location,$email,$coβ€Œβ€‹nsole,$team);

1 Answer

Stu Parker
Stu Parker
4,814 Points

Turned out the problem there is that code double binds the params..only the sepetate binding or the array in execute is needed..