Hello. Thanks for looking.
I'm looking to delete a single row from multiple tables where they all share a common column name, primaryKey, and a common value - $POST_[primaryKey]. Here is the code:
$query="DELETE FROM assetinfo, emplhistory, income, newuser, preliminfo, primarydata, reoinfo, residencehistory WHERE primaryKey='$_POST[primaryKey]'";
$result=mysqli_query($connection, $query) or die (mysqli_error($connection). " <br> Could't run DB Query to Delete Borrower");
And here is the error msg I'm getting:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE primaryKey='jarreola2'' at line 1
Could't run DB Query to Delete Borrower
Is my query valid? Any other ideas on how to delete a row from multiple tables? Thanks!