At 6:05 PM +0000 7/29/07, Ellen V. Coen wrote:
Hello,

You need an update query, syntax explained here:

http://dev.mysql.com/doc/refman/5.0/en/update.html

UPDATE user u1, user2 u2
SET u1.login = u2.login, u1.password = u2.password
WHERE u1.username = u2.username

This will work well provided the user names are unique.

Ellen V. Coen

Ellen et al:

I know this is an old post, but a new twist surfaced.

The above code worked great four months ago, but now the code fails and reports this:

You have an error in your SQL syntax near 'u1, user2 u2 SET u1.login=u2.login, u1.password=u2.password WHERE u1.username=u2' at line 1

It's the same code, what happened? Any ideas?

Would safe_mode ON cause this type of problem?

Thanks,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com
_______________________________________________
New York PHP Community MySQL SIG
http://lists.nyphp.org/mailman/listinfo/mysql

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to