Guest OTD Posted February 21, 2008 Share Posted February 21, 2008 Hello Folks, Trying to edit my cc database in phpmyadmin, and i wish to do a sql update query but im not having any joy, any help in this would be greatly appreciated. basically i wish to write a query that in cubecart_category it copies one column to another column while adding some extra words, the query im currently using is - "update CubeCart_category set cat_metakeywords = `cat_name` & 'word1, word2, word3, word4' but this isnt doing anything..... PLEASE ANY IDEAS IN THIS WOULD BE BRILLIANT AND MUCH APPRECIATE BEFORE I PULL ALL MY HAIR OUT!!!!! (NOT MUCH LEFT AS IT IS!!!!!) Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 21, 2008 Share Posted February 21, 2008 MySQL supports neither '||' nor '+' for concatenating strings. Perhaps only Visual Basic supports '&' for concatenation. MySQL supports an unlimited number of arguments to CONCAT(). I would try: "update CubeCart_category set cat_metakeywords = CONCAT('cat_name', 'word1', 'word2', 'word3', 'word4')" Quote Link to comment Share on other sites More sharing options...
Guest OTD Posted February 21, 2008 Share Posted February 21, 2008 bsmither thank you very much on this, im not currently at work, but i will try this first thing in the morning and i will let you know the outcome, thank you very much for your reply. Quote Link to comment Share on other sites More sharing options...
Guest OTD Posted February 22, 2008 Share Posted February 22, 2008 bsmither as before thank you for your reply, i had to changer the command a little to; update CubeCart_category set cat_metakeywords = CONCAT(`cat_name`, ', word1', ', word2', ', word3', ', word4') but that worked perfect thank you!!!!!!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.