Hi there,

I am wondering if there is a possiblity to delete rows in more than one table with one query.

At the moment I am doing this:

I do have at the moment 3 querys!:
  # get table1_id
  SELECT table1_id
  from ...
  WHERE ID = ...

  # delete dependent entry
  DELETE
      FROM $DB.$T5
  WHERE
      ID = '$data[table1_id]'
  LIMIT 1

  # delete main entry
  DELETE
      FROM $DB.$T4
  WHERE
      ID = '$data[id]'
  LIMIT 1

Is there a better solution as this?

Thanx for any hint,

Merlin

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to