Re: [PHP] Join question [solved]
- From: robert@xxxxxxxxxxxxx (Robert Cummings)
- Date: Thu, 29 Nov 2007 23:17:29 -0500
On Fri, 2007-11-30 at 14:00 +1100, Chris wrote:
Out of curiosity, what SQL server (and version) are you using? I
currently have MySQL 5.0.33 on my dev box and I had no problem with the
query I gave you. Perhaps it's a version issue. There really shouldn't
be a problem updating a table that also occurs in the select query since
the select query should take place before the insert.
He wasn't doing an insert/select, he was doing an update with two tables
joined together.
He was doing an update/select and an insert/select. And the query I sent
performed the insert/select without problem on my system. A similar
query would have done the update/select. The fact that the select
portion required a join doesn't change anything.
<copy>
I thought that --
UPDATE user1 u1, user2 u2
SET u1.login = u2.login, u1.password = u2.password
WHERE u1.username = u2.username
-- would work, but it don't.
Wrong query for either of the needs :)
Cheers,
Rob.
--
............................................................
SwarmBuy.com - http://www.swarmbuy.com
Leveraging the buying power of the masses!
............................................................
.
- Follow-Ups:
- Re: [PHP] Join question [solved]
- From: "Daniel Brown"
- Re: [PHP] Join question [solved]
- References:
- Re: [PHP] Join question
- From: Wolf
- Re: [PHP] Join question
- From: Robert Cummings
- Re: [PHP] Join question
- From: tedd
- Re: [PHP] Join question [solved]
- From: tedd
- Re: [PHP] Join question [solved]
- From: Robert Cummings
- Re: [PHP] Join question [solved]
- From: Chris
- Re: [PHP] Join question
- Prev by Date: Re: [PHP] Join question
- Next by Date: Re: [PHP] Join question
- Previous by thread: Re: [PHP] Join question [solved]
- Next by thread: Re: [PHP] Join question [solved]
- Index(es):