James Black <[EMAIL PROTECTED]> wrote on 01/20/2005 03:08:33 PM:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> [EMAIL PROTECTED] wrote:
> | You should already KNOW the parent comment of a comment when you
create
> | it. Don't you? Imagine the following thread:
>
> ~ I am trying to not
James Black <[EMAIL PROTECTED]> wrote on 01/20/2005 02:44:41 PM:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Philippe Poelvoorde wrote:
> |
> | Insert into comments(list of you fields here )
> | select 0,1,null,'testuser','testcomment',max(idx) from comments
> | where sourceid=1;
>
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Philippe Poelvoorde wrote:
|
| Insert into comments(list of you fields here )
| select 0,1,null,'testuser','testcomment',max(idx) from comments
| where sourceid=1;
|
| but querying max(idx) is a bad idea. you could get the last inserted id
| with th
~ 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
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Philippe Poelvoorde wrote:
| James Black wrote:
|
|> -BEGIN PGP SIGNED MESSAGE-
|> Hash: SHA1
|>
|> I would like to set one column to point to the auto-incrementing index
|> of the last comment in the database for my application, but I am gettin
James Black wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I would like to set one column to point to the auto-incrementing index
of the last comment in the database for my application, but I am getting
an error when I run my test, and so I wonder if what I am trying to do
is possible.
My SQ
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I would like to set one column to point to the auto-incrementing index
of the last comment in the database for my application, but I am getting
an error when I run my test, and so I wonder if what I am trying to do
is possible.
I am using mysql 5.0.1, b