CLU Posted December 6, 2011 Report Share Posted December 6, 2011 Hi Guys, Just quick one, I completed ben's tut on CRUD with mysqli, within my editor (Netbeans) when using bind_param in regards to the used question marks for the values, i get a small warning stating "Possible accidental assignment, assignments in conditions should be avoided." Code works fine, but can anyone explain what this might mean? Any guidance on this would be appreciated. Kind Regards. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted December 6, 2011 Report Share Posted December 6, 2011 You'd have to post the code for me to be sure, but I believe it's complaining about lines like this: if ($stmt = $mysqli->prepare("UPDATE players SET firstname = ?, lastname = ? WHERE id=?")) You can safely ignore that warning, or rewrite it slightly: $stmt = $mysqli->prepare("UPDATE players SET firstname = ?, lastname = ? WHERE id=?"); if ($stmt) It's just that Netbeans is seeing the = within a if statement, and thinking that maybe you made a mistake and you meant to say "==" or another comparison operator. I believe you should be able to disable this warning if you want: http://forums.netbeans.org/topic8214.html Quote Link to comment Share on other sites More sharing options...
CLU Posted December 7, 2011 Author Report Share Posted December 7, 2011 Thanks Ben. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.