I am trying to do an update, where item numbers 1-9 get four 0's added
to the front, 10-99 get three 0's etc.
Here is my query so far:
if image_location = 1 to 9
then update inventory_items set image_location = concat("", image_location)
end if
Looking at the mysql manual, it just says to do
I need to run a query that will take the data from item_number field,
add "-1.jpg" to the end of it, and store it in image_location
I have tried update inventory_items set image_location = item_number + "-1.jpg";
but that just places the item number into the field, without the text
in quotes.
How
I am new to mysql. I am trying to do a simple update query to update a
field based on the contents of another field in the same table.
Here is what I have.
update inventory_items set name = "necklace" where description like
"%necklace%";
I am not sure what is wrong. select * from inventory_items w