Assistance needed for “special query” Deleting info in two tables
Hello, I have a site I’m working on now that has many tables. I’m trying to figure out a custom query that would achieve the following:
Two tables – COMPANIES - LOCATIONS
customer_id is the relational link between the two. I have created all of the pages with the Data Assist Wizzard. However when using the company_Delete.php page I also need it to delete all of the locations that are listed under that customer_id in the LOCATIONS table.
Right now this is what code looks like for the DELETE statement.
$WA_Sql = "DELETE FROM `" . $WA_table . "` WHERE " . $deleteParamsObj->sqlWhereClause;
Can anyone help to achieve this