sungpeng Posted March 30, 2009 Share Posted March 30, 2009 $delete=mysql_query("DELETE FROM listings.img0 WHERE rid = '$rid'"); hi check how to delete one field "img0" from index number "rid". Above code not working Thank Link to comment https://forums.phpfreaks.com/topic/151725-solved-delete-one-field-img0-from-index-number-rid/ Share on other sites More sharing options...
Mark Baker Posted March 30, 2009 Share Posted March 30, 2009 You don't delete fields/columns in SQL, you can only delete rows. You can, however, set fields to a null value $update=mysql_query("UPDATE listings SET img0 = NULL WHERE rid = '$rid'"); Link to comment https://forums.phpfreaks.com/topic/151725-solved-delete-one-field-img0-from-index-number-rid/#findComment-796739 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.