-----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, but I may have to switch to 4.1.9 if I can't get ~ mysql 5.0.2 for solaris 8, to do my tests with subqueries.
My SQL command is: INSERT INTo comments VALUES(0, 1, NULL, 'testuser', 'this is a test comment', (SELECT max(idx) FROM comments WHERE sourceid=1))
~ I get an error: You can't specify target table 'comments' for update in FROM clause.
But, if I don't have 'From comments', then I get an error also.
Thank you for any help.
- -- "Love is mutual self-giving that ends in self-recovery." Fulton Sheen James Black [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFB78G0ikQgpVn8xrARAhy9AJ9Bl+Yy+RMRtHrbzd0Iv4OONZXt8wCfWTJ2 ishDXVCmM1/+pBZsusy1Kvk= =tdXW -----END PGP SIGNATURE-----
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]