Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/16/2019 in all areas

  1. As with SELECT statements, INNER JOIN requires matching records. If some tables may not contain the job_id being deleted then you need LEFT JOINS DELETE ssm_job, ssm_menu_order, ssm_equipment_order, ssm_money_order FROM ssm_job LEFT JOIN ssm_menu_order USING (job_id) LEFT JOIN ssm_equipment_order USING (job_id) LEFT JOIN ssm_money_order USING (job_id) WHERE ssm_job.job_id = ?
    1 point
  2. @ginerjm is correct. You cannot pass table or column names as parameters to a prepared query; only data values. It sounds like you need to do something like this (three table example for brevity) DELETE table1, table2, table3 FROM table1 JOIN table2 USING (job_id) JOIN table3 USING (job_id) WHERE table1.job_id = ?
    1 point
This leaderboard is set to New York/GMT-04:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.