almightyegg Posted April 5, 2007 Share Posted April 5, 2007 $update = mysql_query("UPDATE clutch (rank1, rank2, rank3, rank4, rank5, rank6, rank7, rank8, rank9, rank10, rank11, rank12, rank13, rank14, rank15, rank1color, rank2color, rank3color, rank4color, rank5color, rank6color, rank7color, rank8color, rank9color, rank10color, rank11color, rank12color, rank13color, rank14color, rank15color) VALUES('$rank1', '$rank2', '$rank3', '$rank4', '$rank5', '$rank6', '$rank7', '$rank8', '$rank9', '$rank10', '$rank11', '$rank12', '$rank13', '$rank14', '$rank15', '$rank1color', '$rank2color', '$rank3color', '$rank4color', '$rank5color', '$rank6color', '$rank7color', '$rank8color', '$rank9color', '$rank10color', '$rank11color', '$rank12color', '$rank13color', '$rank14color', '$rank15color') WHERE id = '{$clutch['id']}'"); It shows no error but when doing: if(!$update){ echo "An error occured during the update process."; }else{ echo "Ranks have been updated successfully."; } it shows: An error occured during the update process. Link to comment https://forums.phpfreaks.com/topic/45804-update-not-working/ Share on other sites More sharing options...
Caesar Posted April 5, 2007 Share Posted April 5, 2007 Your update syntax should look something like: <?php $db->connect(); $db->query("UPDATE table SET field='$value', field2='$value2', field3='$value3' WHERE id='$id'"); $db->close(); ?> Link to comment https://forums.phpfreaks.com/topic/45804-update-not-working/#findComment-222542 Share on other sites More sharing options...
PC Nerd Posted April 6, 2007 Share Posted April 6, 2007 try $Query = mysqli_query() or die ( mysqli_error()); check the syntax, im not 100% sure Link to comment https://forums.phpfreaks.com/topic/45804-update-not-working/#findComment-222644 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.