Jump to content

Create Invoice fails. MySql 5.7


TonyPR

Recommended Posts

Generating an Invoice creates the following error message using PS 1.6.1 Mysql 5.7.10

 

 
UPDATE `ps_order_invoice` SET number =(SELECT new_number FROM (SELECT (MAX(`number`) + 1) AS new_number
FROM `ps_order_invoice`) AS result) WHERE `id_order_invoice` = 1;
 
 
Error Code: 1093
You can't specify target table 'ps_order_invoice' for update in FROM clause
 
 
//Works OK in 5.6
 
 
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...