7 messages in com.mysql.lists.mysqlRe: can a subquery be used in an insert
FromSent OnAttachments
James Black20 Jan 2005 06:35 
Philippe Poelvoorde20 Jan 2005 06:58 
James Black20 Jan 2005 07:09 
Philippe Poelvoorde20 Jan 2005 07:56 
James Black20 Jan 2005 11:44 
SGr...@unimin.com20 Jan 2005 11:59 
SGr...@unimin.com20 Jan 2005 12:56 
Subject:Re: can a subquery be used in an insert
From:Philippe Poelvoorde (phil@costrading.co.uk)
Date:01/20/2005 07:56:52 AM
List:com.mysql.lists.mysql

~ I want to store the parent comment to the comment being added, so I can ensure the comments are printed out in the correct order.

Then, see the post earlier called "SQL schema", where there is child->parent relationship with comments.

But you now when a user post a comment which is the parent comment(0 if there is no parent, or the value you give thanks to a hidden input field in your wiki), so you normally don't need that extra query.