Jump to content


Photo

can i delete a row like this


  • Please log in to reply
1 reply to this topic

#1 frank1002us

frank1002us
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 30 March 2006 - 04:54 AM

can i do something like this and why it is not working
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'" );


#2 Guest_footballkid4_*

Guest_footballkid4_*
  • Guests

Posted 30 March 2006 - 05:11 AM

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] FROM tablename WHERE whereclause ORDER BY 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='' WHERE whereclause [!--sql2--][/div][!--sql3--]




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users