I am a complete newbie at this and really do not know sql. I am just stumbling around but have completed a few queries with success. I have a field in a table that I want to APPEND information to, specifically the text " 7" (Without the quotes) I am using this:
INSERT INTO jos_vm_product product_sku VALUES ' 7'
But I keep getting an error.
I am using phpMyAdmin
Can anyone offer some help here. This would save me hours of work.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RT INTO jos_vm_product (product_sku) VALUES (7)' at line 1
That worked but instead of appending a field in a record it added a whole new record. The filed product_sku was set to 7 and all other fields to NULL. Not was I was wanting to do.
I did a slight modification but it worked. Many many thanks for your help.
update jos_vm_product set product_sku=concat(product_sku, ' 7') where product_id>'106'
I have another thing I am wanting to accomplish it will make a lot more sense to do it using queries than doing through the Virtuemart interface. I have a client that wants to show 50 stone sizes and instead of just putting in all the stones once and using an option to choose one of the four sizes to order, he wants to show 50 stones in a 7mm category, 50 stones in a 8mm category, 50 stones in a 10mm category, 50 stones in a 12mm category. I advised against it but he is insistent. So now since I do not want to enter 150 stones back into the database using the VM admin, I figured there is some way to insert a copy each of the stones back into the database using a query. So basically there will be four of each kind and then I will go back and add 7mm, 8mm, 10mm, and 12mm to the end of the names to show the difference.