Hi lat9
Rather a good idea - and I may eventually take that route if I cant get the query option to work.
But the query is my preference purely because I would now like to see if I can get it to work![]()
Cheers
Brinley
Hi lat9
Rather a good idea - and I may eventually take that route if I cant get the query option to work.
But the query is my preference purely because I would now like to see if I can get it to work![]()
Cheers
Brinley
OK, Brinley, based on this stackoverflow posting, you'd enter the following into your admin's Tools->Install SQL Patches (after backing up your database!):
That will prepend the HTML you identified into each product's description.Code:UPDATE products_description SET products_description=CONCAT('<h4>Special gifts for special occasions</h4> <h1>the details</h1>',products_description);
Hi lat9
Thanks for the help - I did read quite a few threads on Stackoverflow and did see one on using CONCAT but didn't really understand it so i used append instead.
Will try it out later.
Thanks once again.
Cheers
Brinley
Not entirely sure if there is still a quest to find a way to append data to an existing field by any means other than the use of CONCAT (in applications such as Microsoft Excel or Open Office this would be CONCATENATE) or not. I've done some searching and it makes me think that the concept of an append query is/was being misunderstood. In other applications (the "popular" one on the Internet is Microsoft Access) an append query adds the records (rows) of data from one table to another. This is not the same as addding the field of one table (even if the table being temporary or permanent had only one record which was the data to be merged to the existing table) to the field of another.
Maybe once the above is attempted the success of its use can be identified.
Further, understanding the "need" to solve the problem to which the above solution was provided, be sure to consider the bigger picture like, now that this has been done with existing data, what is going to be done in the future to ensure that the exact same data will be prepended in the future? Why is the exact same data referenced? Well, consider further down the line when it is desired to change that statement? The only "convenient" way is to run another sql/search and modify the data one-for-one...
From a database container perspective, now every record contains the same data. This is instead of a single record of some type (suggested was a non-database style reference) that takes up less storage space or as suggested no database storage space at all.
There's nothing technically wrong about the approach, but remember that with every change or desired action, there is or will be maintenance involved. May not seem so now, but obviously there was something not liked about how it was, likely to be a similar dissatisfaction in the future.
Nothing wrong with trying to get to the bottom of an issue and trying to get one's questions answered. :)
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
I have just run the query and can confirm it works perfectly - thx lat9 ur a star!
mc12345678 I understand the drawbacks you highlight but given that he length of the appended string is really small I don't think its an issue. I did look at creating a single addition to the product info page but decided I felt more comfortable with trying the query route.
As for the need make changes in the future - luckily I already know how to run a replace query
Thanks again for the input both- much appreciated.
Cheers
Brinley
Happy to have helped, Brinley.