Jump to content

Sales setup


huggettm

Recommended Posts

Some SQL queries seems the easiest to me, I tested this out on my old database and it didn't seem to set anything on fire, was 1107 records done in around 2 seconds.

I'd make backups beforehand though, I'm mostly a liability when allowed near the database directly. 

Baring in mind this will do some weird stuff to any existing data that you have the price_quantity sheet, I just deleted all the data that was in there before hand cause it didn't matter to me, your mileage may vary.

INSERT `CubeCart_pricing_quantity` (`price`, `product_id`) SELECT `price`, `product_id` FROM `CubeCart_inventory`


UPDATE `CubeCart_pricing_quantity` SET `quantity` = 2


UPDATE `CubeCart_pricing_quantity` SET `price` = `price` * 0.95

 

Edited by Lastwolf
Link to comment
Share on other sites

Thanks, but it didnt like that :)

 

Error

Static analysis:

5 errors were found during analysis.

 

  1. Unexpected token. (near "`price`" at position 36)
  2. Unexpected beginning of statement. (near "`price`" at position 36)
  3. Unexpected beginning of statement. (near "`product_id`" at position 45)
  4. A new statement was found, but no delimiter between it and the previous one. (near "UPDATE" at position 119)
  5. This type of clause was previously parsed. (near "UPDATE" at position 178)

 

SQL query: Documentation

INSERT `CubeCart_pricing_quantity` (`price`, `product_id`) SELECT `price`, `product_id` FROM `CubeCart_inventory` UPDATE `CubeCart_pricing_quantity` SET `quantity` = 2 UPDATE `CubeCart_pricing_quantity` SET `price` = `price` * 0.95

MySQL said: Documentation

#1064 - 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 'UPDATE `CubeCart_pricing_quantity` SET `quantity` = 2

UPDATE `CubeCart_pric' at line 4

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...