Jump to content

SQL code help


arjundass
 Share

Recommended Posts

I have created a new field in orders table named date_expiration.

I have added this line "" $fields['date_expiration'] = pSQL($this->date_add); "" , to populate this field .

I want to add 90 days + date_add to date_expiration field .

Kindly help.

Share this post


Link to post
Share on other sites

this is php code, not sql

if $this->date_add is unix timestamp you may add the number of seconds 3600*24*90

if $this->date_add is string convert it to time with DateTime::createFromFormat() first, then add seconds.

Find the similar example in classes/Discount.php at the end of createOrderDiscount function.

Share this post


Link to post
Share on other sites

Thank you Otzy for reply .

I also need to create a new table , i have created in prestashop database. but i can,t able to get any values to it .

HOw do i register it in prestashop , to fill it with values like order_id , customer_id ??

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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More