• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Automatically fixing item names in the catalogue

Newbie Spellweaver
Joined
Sep 24, 2011
Messages
47
Reaction score
9
I made a simple SQL script that will update all of your catalog_items catalog_name to match the furni's public name. This specific code should work fine with MySql
Arcturus
Code:
UPDATE catalog_items INNER JOIN items_base ON catalog_items.item_ids = items_base.id SET catalog_items.catalog_name = items_base.public_name
Plus R2
Code:
 UPDATE catalog_items INNER JOIN furniture ON catalog_items.item_id = furniture.id SET catalog_items.catalog_name = furniture.public_name


For the newbies:
Run this SQL using Navicat/phpmyadmin, go to your hotel and type :update catalog
 
Newbie Spellweaver
Joined
Sep 24, 2011
Messages
47
Reaction score
9
Be careful with that, catalog_items.item_ids isn't called item_IDS for nothing, it can contain multiple IDs semicolon separated.

This is true. I haven't encountered any issues by using this code. But another query that only fixes names that are broken would be:
Code:
UPDATE catalog_items INNER JOIN items_base ON catalog_items.catalog_name = items_base.item_name SET catalog_items.catalog_name = items_base.public_name
This takes much longer, but is more meticulous (Note: change the names of the columns to fit your database if you're not using Arcturus)
 
Back
Top