You just need to specify that you want to delete the entries from the posts
table:
DELETE posts
FROM posts
INNER JOIN projects ON projects.project_id = posts.project_id
WHERE projects.client_id = :client_id
EDIT: For more information you can see this alternative answer
More Related Contents:
- convert mysql query to laravel query builder
- how to generate report for attendance system
- How can I return pivot table output in MySQL?
- MySQL pivot table query with dynamic columns
- ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)
- Finding duplicate values in MySQL
- What is the size of column of int(11) in mysql in bytes?
- Create a temporary table in a SELECT statement without a separate CREATE TABLE
- MySQL – Selecting a Column not in Group By
- Join tables from two different server
- MySQL : isn’t in GROUP BY
- Why does MySQL report a syntax error on FULL OUTER JOIN?
- Error creating table: You have an error in your SQL syntax near ‘order( order_id INT UNSIGNED NOT NULL AUTO_INCREMENT, user_id ‘ at line 1 [duplicate]
- SQL: Creating a Relational table with 2 different auto_increment
- CURRENT_DATE/CURDATE() not working as default DATE value
- How to extract the nth word and count word occurrences in a MySQL string?
- MySql Count cannot show 0 values
- Cannot change column used in a foreign key constraint
- How does one create an index on the date part of DATETIME field in MySql
- How to delete a MySQL record after a certain time
- using (-) dash in mysql table name
- Force InnoDB to recheck foreign keys on a table/tables?
- Error: Tablespace for table xxx exists. Please DISCARD the tablespace before IMPORT
- Let MySQL users create databases, but allow access to only their own databases
- How can I enable MySQL’s slow query log without restarting MySQL?
- Does MySQL allows to create database with dot?
- Second SELECT query if first SELECT returns 0 rows
- MySQL throws Incorrect string value error
- mysql create table dynamically
- Errno 121, duplicate key on write or update?