Jump to content

can i delete a row like this


frank1002us

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]
Link to comment
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--]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.