frank1002us Posted March 30, 2006 Share Posted March 30, 2006 can i do something like this and why it is not working[code]MYSQL_QUERY( "DELETE pa.products_attributes_id ,pa.products_id, pa.options_id, pa.options_values_id, pa.options_values_price, pa.price_prefix, pa.products_options_sort_order , pa.products_attributes_weight,pa.options_type_id,pa.attribute_sort, pa.products_attributes_weight_prefix,pa.options_values_weight,pa.options_values_qty,pa.options_values_image,pa.sort_order FROM products_attributes pa,products_options po WHERE pa.products_id = '$current_product_id'and po.products_options_id=pa.options_id and po.products_options_type ='$type'" ); [/code] Link to comment https://forums.phpfreaks.com/topic/6153-can-i-delete-a-row-like-this/ Share on other sites More sharing options...
Guest footballkid4 Posted March 30, 2006 Share Posted March 30, 2006 Delete queries are structured like this:[!--sql--][div class=\'sqltop\']SQL[/div][div class=\'sqlmain\'][!--sql1--][span style=\'color:blue;font-weight:bold\']DELETE[/span] [color=green]FROM[/color] [color=orange]tablename[/color] [color=green]WHERE[/color] whereclause [color=green]ORDER BY[/color] orderclause LIMIT limitclause [!--sql2--][/div][!--sql3--]As shown, there is really no way (and no point) of deleting just a single column, for something like that you could just use:[!--sql--][div class=\'sqltop\']SQL[/div][div class=\'sqlmain\'][!--sql1--][span style=\'color:blue;font-weight:bold\']UPDATE[/span] tablename SET column[color=orange]=[/color]'' [color=green]WHERE[/color] whereclause [!--sql2--][/div][!--sql3--] Link to comment https://forums.phpfreaks.com/topic/6153-can-i-delete-a-row-like-this/#findComment-22192 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.