Jump to content

Archived

This topic is now archived and is closed to further replies.

frank1002us

can i delete a row like this

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Guest footballkid4
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--]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.