Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
quote:
Originally posted by: newchickinCF
Thanks Dan for your quick replies. But The above solved my proble. but Now i have stuck at a point where i need to delete a record for articles table and relevant records from comments table depending on the fileID in both tables.
well the FileID is primary key in articles table and FILEID is refrenced in comments table but as an index not s a foreign key. I try making it forien but it generates various error: like foreign key mismatch, etc.
I did write a query which execute successfully but does delete the records from the comments table the query is as under:
DELETE articles
FROM articles
RIGHT JOIN
comments
ON articles.fileID = comments.fileID
where
articles.FileID IN (<cfqueryparam cfsqltype="cf_sql_integer" value="#trim(arguments.fileID)#" list="yes">)
Copy link to clipboard
Copied