PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
mysql_query ("UPDATE generators
SET flag_status = 'on', flag_reason = '".pnVarPrepForStore($flag_reason)."'
WHERE generator_id ='$generator_id'")
or die (mysql_error());
You have it formatted correctly (at first glance). One thing that can cause that error is if you are putting in the wrong data into the column type. what does your table structure look like and what is the returned value of pnVarPrepForStore($flag_reason)?
what about generator_id... is that int? if so then try removing the '' from around it.
if you havent done it already, echo out your SQL statement and see exactly what its returning. sometimes a variable can be returning something you havent expected.
Just sat back down at my desk and all is good...
Thanks for the help I thought I was loosing my mind, but now maybe it was my localhost having a nutty!