darkfreaks Posted February 4, 2008 Share Posted February 4, 2008 ok so no matter what i do my query does not delete? any suggestions? <?php if($_POST['journal']) { mysql_query("DELETE FROM vc_journal WHERE id='$id'"); mysql_query("DELETE FROM vc_jcomments WHERE jid='$id'"); echo "Your journal(s) have been deleted<br>"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/89301-solved-delete-help/ Share on other sites More sharing options...
mikefrederick Posted February 4, 2008 Share Posted February 4, 2008 <?php if($_POST['journal']) { mysql_query("DELETE FROM vc_journal WHERE id='$id'"); mysql_query("DELETE FROM vc_jcomments WHERE jid='$id'"); echo "Your journal(s) have been deleted<br>"; } ?> that should work, assuming that journal was posted, just try it and let me know. Quote Link to comment https://forums.phpfreaks.com/topic/89301-solved-delete-help/#findComment-457276 Share on other sites More sharing options...
pocobueno1388 Posted February 4, 2008 Share Posted February 4, 2008 You have been here long enough to know the basic debugging procedures for a query. <?php if($_POST['journal']) { $query = "DELETE FROM vc_journal WHERE id='$id'"; $query2 = "DELETE FROM vc_jcomments WHERE jid='$id'"; $result = mysql_query($query)or die(mysql_error() . "<p>With Query:<br>$query<p>"); $result2 = mysql_query($query2)or die(mysql_error() . "<p>With Query:<br>$query2<p>"); echo "Your journal(s) have been deleted<br>"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/89301-solved-delete-help/#findComment-457281 Share on other sites More sharing options...
darkfreaks Posted February 4, 2008 Author Share Posted February 4, 2008 now i get query was empty but it still there? Quote Link to comment https://forums.phpfreaks.com/topic/89301-solved-delete-help/#findComment-457286 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.