Jump to content
Sign in to follow this  
thdt98

Stock Taking Cost 0.2

Recommended Posts

Welcome to this thread for this new contribution.

 

New feature:

- Export to Excel in CVS format

Share this post


Link to post
Share on other sites

First off, This looks like an amazing contribution and I thank you for your time coding it.

 

I'm pretty good with PHP but I need a bit of help with the first step:

 

1. add a table in ( database )

 

ALTER TABLE `products` ADD `products_price_cost` decimal(10,2) default NULL AFTER `products_price`;

 

How exactly is that done? I believe it involves going into phpMyAdmin but I have no clue what to do after that.

 

 

 

Thanks for all any help in advance.

Share this post


Link to post
Share on other sites

Yes you are right you have to go into phpMyadmin.

 

You have to open a query window (SQL button for instance) and placing into it the code 'Alter.....' and press go. The table should added.

 

I think the best is to have a go. When I started last year I knew nothing in mySQL and php. I learned by try and error and with those forums.

 

Maybe my install might be a little difficult for someone with no experience. Perhaps the contrib margin 2.6 would be easier.

Anyway give it a go.

Share this post


Link to post
Share on other sites

thanks for that,

I think I did it right the first time I tried because this is the error it gives me now:

 

Error

 

SQL-query:

 

ALTER TABLE `products` ADD `products_price_cost` decimal( 10, 2 ) default NULL AFTER `products_price`

 

MySQL said: Documentation

#1060 - Duplicate column name 'products_price_cost'

Share this post


Link to post
Share on other sites

Yes you did it twice I guess.

Check if you have 2 table with the same name, if it is the case erease one.

Share this post


Link to post
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
Sign in to follow this  

×