Goochi Posted December 9, 2003 Share Posted December 9, 2003 I got following code at my fanlisting-script.. $query = \\\"UPDATE fanlisting SET censor = \'n\' WHERE id = \'$uncensor\'\\\"; mysql_query ( $query ); echo $query . \'<br>\'; this should modify a record in the datebase + output the SQL-code to the screen with the echo. The output to the screen is UPDATE fanlisting SET censor = \'n\' WHERE id = \'50\' but in the DB isn\'t happening anything.. while when I copy the output that appears on the screen (second quote) and I paste it in my phpMyAdmin then it does update the record. What might cause this ? thanks Quote Link to comment Share on other sites More sharing options...
shivabharat Posted December 9, 2003 Share Posted December 9, 2003 Try this $query = "UPDATE fanlisting SET censor = \'n\' WHERE id = \'$uncensor\'"; mysql_query($query) or die(mysql_error()); echo $query.\'<br>\'; see if you get any error when you execute this. I have added mysql_error() which will report if there is any error. Quote Link to comment Share on other sites More sharing options...
Goochi Posted December 9, 2003 Author Share Posted December 9, 2003 very choqing.. \"No Database Selected\" :oops: thanks for helping.. very handy the mysql_error.. 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.