| SitePoint Sponsor |




Convert your dollars into silver coins. www.convert2silver.com
You shouldn't call your column DATE, since that is a reserved word in MySQL. Unless you like putting backticks around your column names
Did you try that query?
Guido - Community Team Advisor
Do you know where the (database) error is? Add it to the list!
Thinking Web: Voices of the Community
Blog - Free Flash Slideshow Widget




Meaning I should add ticks around DATE like the following?
UPDATE users SET 'DATE' = (SELECT DATE FROM users WHERE uID = '2637') WHERE uID = '10576';
Convert your dollars into silver coins. www.convert2silver.com
Backticks, not normal single quotes. But it would be better to give that column another name, like registration_date or whatever.
Guido - Community Team Advisor
Do you know where the (database) error is? Add it to the list!
Thinking Web: Voices of the Community
Blog - Free Flash Slideshow Widget




Can you give me an example? Backticks is a new thing to me.
Convert your dollars into silver coins. www.convert2silver.com
I don't have them on my keyboard (and don't remember the ascii code), but you can google for it![]()
Guido - Community Team Advisor
Do you know where the (database) error is? Add it to the list!
Thinking Web: Voices of the Community
Blog - Free Flash Slideshow Widget
Backtick: `
US layout keyboards have them on the same button as tilde: ~ in the top left, underneath the ESC button.
So your query would be:
(I haven't tested this, so I don't know if it works)Code sql:UPDATE users SET `DATE` = (SELECT `DATE` FROM users WHERE uID = '2637') WHERE uID = '10576';
But, as Guido mentions, it's best not to use column names that are reserved words in MySQL.
Bookmarks