Here Is my delete query.But I cant find where is the error caused. When i run this code last line showing "Song Deleted Successfully!" without any delete. Please help me ASAP. ******************************************* $Song_id=$_GET["id"]; $my_delete="DELETE * FROM song_detail WHERE song_ID = '$Song_id' LIMIT 1 "; $result=mysql_query($my_delete) or mysql_error(); echo "<h2 align=\"center\">Song Deleted Successfully!</h2>"; ************************ Same Problem with my update query. Where is the error? ************************** $singer_Id=$_GET["singer_id"]; $singer_name=$_GET["name"]; $singer_description=$_GET["description"]; //$album_id=$_GET["album_name"]; $music_category_id=$_GET["song_category"]; /*echo $singer_Id ; echo $singer_name ; echo $singer_description ; echo $music_category_id ; */ $my_update = "UPDATE singer_band SET singer_Name='$singer_name', description='$singer_description', music_category_ID='$music_category_id', WHERE singer_ID='$singer_Id'"; /* $my_update = "UPDATE singer_band SET singer_Name='$singer_name', description='$singer_description', music_category_ID='$music_category_id', WHERE singer_ID='$singer_Id'"; */ $result=mysql_query($my_update)or die ("Could Not Run Query!"); //$result=mysql_query($my_update) or die("Cann't Run Query!"); echo "<h2 align=\"center\">Song Updated Successfully!</h2>"; *******************************
Edit $Song_id=$_GET["id"]; $my_delete="DELETE * FROM song_detail WHERE song_ID = '$Song_id' LIMIT 1 "; $result=mysql_query($my_delete) or mysql_error(); echo "<h2 align=\"center\">Song Deleted Successfully!</h2>"; PHP: to $Song_id = $_GET["id"]; $my_delete = "DELETE FROM `song_detail` WHERE `song_ID` = '" . $Song_id . "' LIMIT 1"; $result = mysql_query($my_delete) or die(mysql_error()); echo "<h2 align=\"center\">Song Deleted Successfully!</h2>"; PHP: