Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7975375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:37:29+00:00 2026-06-04T08:37:29+00:00

Basically, I have three tables workplaces with a field id (the one of which

  • 0

Basically, I have three tables

workplaces with a field id (the one of which i want to delete the associated data), and a participantlist_id that identifies the participant list.

participantlist – just list_id and name

participantlist_links – with list_id and participant_id

the query that i’m trying to use is this:

DELETE FROM workplaces,
participantlist,
participantlist_links 
WHERE workplaces.id =  '8' AND 
      workplaces.participantlist_id = participantlist_links.list_id AND  
      workplaces.participantlist_id = participantlist.list_id

but i get:

MySQL said:

1064 – 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 workplaces.id=’8′ AND workplaces.participantlist_id = participant’ at line 3

any ideas?

SOLUTION:

    DELETE t1, t2, t3
    FROM workplaces AS t1
    LEFT JOIN participantlist AS t2 ON t1.participantlist_id = t2.list_id
    LEFT JOIN participantlist_links AS t3 ON t2.list_id = t3.list_id
    WHERE t1.id = '8'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T08:37:30+00:00Added an answer on June 4, 2026 at 8:37 am

    You can use JOIN to delete from multiple tables like this:

    DELETE t1, t2 FROM t1 INNER JOIN t2 INNER JOIN t3
    WHERE t1.id=t2.id AND t2.id=t3.id;
    

    http://dev.mysql.com/doc/refman/5.5/en/delete.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically what I am trying to achieve is I have three tables, one parent
I basically have three tables, posts, images and postimages (this simply contains the ids
Basically I have some class objects, each with three properties. Once one class object
I have this page which has three peson searchs on them. Basically it's a
In our product, we have frames that are basically three inheritance levels down from
I have a problem where I need to select data from three different tables,
I have three tables, which are each 1:n. An entry in table1 has n
I have used mysql to join three tables and print the data in an
Basically, I have three tables, lets call them TableA, TableB and TableC. Table A
I have three tables, table A has a unique primary key that is auto-incremented,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.