Hi,
I cant get this query to work with MySQL.
delete from
companies as com,
employees as emp,
informations as inf
where
emp.companyId=com.id
and
inf.companyId=com.id
and
com.enabled=0;
I ve this tables...
Company
------------
Id Name Enabled
1 acme 0
2 mysql 1
Employees
-------------
Id Name CompanyId
1 Smith 1
2 Will 1
3 Cage 2
Information
-------------
Id Description CompanyId
1 some-info 1
2 some-info 2
I want to delete:
company id 1 row, smith and will rows, 'some-info' (1) row.
Please help me!!!
I cant get this query to work with MySQL.
delete from
companies as com,
employees as emp,
informations as inf
where
emp.companyId=com.id
and
inf.companyId=com.id
and
com.enabled=0;
I ve this tables...
Company
------------
Id Name Enabled
1 acme 0
2 mysql 1
Employees
-------------
Id Name CompanyId
1 Smith 1
2 Will 1
3 Cage 2
Information
-------------
Id Description CompanyId
1 some-info 1
2 some-info 2
I want to delete:
company id 1 row, smith and will rows, 'some-info' (1) row.
Please help me!!!