www.webdeveloper.com
Results 1 to 1 of 1

Thread: how to DELETE some table with a bit different "WHERE"

  1. #1
    Join Date
    Mar 2006
    Posts
    48

    how to DELETE some table/database using only 1 code?

    i have some select code:

    $query20 =
    "SELECT * FROM `product_group`
    LEFT JOIN `relation` ON `kop_header`.`relation_id` =`relation`.`id`
    WHERE `relation_id` = '$id[$i]'";
    $query27 =
    "SELECT * FROM `order_line`
    LEFT JOIN `relation` ON `order_line`.`relation_id` = `relation`.`id`
    WHERE `relation_id` = '$id[$i]'";
    $query21 =
    "SELECT * FROM `net_price`
    LEFT JOIN `relation` ON `net_price`.`relation_id` = `relation`.`id`
    WHERE `relation_id` = '$id[$i]'";

    i want to delete those table from that code
    can i delete all of that 3 table with 1 code?

    i havent try this code:
    "DELETE * FROM `net_price`
    LEFT JOIN `relation` ON `net_price`.`relation_id` = `relation`.`id`
    WHERE `relation_id` = '$id[$i]'";
    because im afraid i'll delete the table, is this code right? & (same question) how to delete 3 table with 1 code?
    thx
    Last edited by cmon1011; 03-29-2006 at 05:12 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles