Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 23/11/2024 Black Friday 2024

    BIG SALE, 30% discount for all our extensions. Use BF24 coupon code. Hurry up the discount is valid till 3 December.

  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

[SOLVED] Date format, server side pagination
(1 viewing) (1) Guest
Go to bottomPage: 123
TOPIC: [SOLVED] Date format, server side pagination
#58786
[SOLVED] Date format, server side pagination 8 Years, 1 Month ago Karma: 1
Hi

1. How to use format option to format date "2016-10-18 07:28:24" into d.m.Y?


2. When I turn server side pagination on, this query doesn't work:

SELECT
id,
plan_id,
first_name,
last_name,
email,
first_reminder_sent_at,
second_reminder_sent_at,
third_reminder_sent_at,
from_date,
to_date
FROM
#__table_name
ORDER BY id

Module is stuck in Processing...

After investigation I've found that this field causes problem: from_date.
- When I remove from_date from query module works properly.
- Data in to_date field is exact like in from_date, but with 1 year in advance from from_date
- When I turn off server side pagination, module works OK even with from_date field in query.

I need to have server side pagination turned on because table holds approx 5k entries so module fails to load without server side pagination, it shows blank page only.

So how come that from_date doesn't work and to_date works OK?

Any hints?

Thanks,
Regards
Krx
User Offline Click here to see the profile of this user
Last Edit: 2016/10/19 08:15 By Krx.
The administrator has disabled public write access.
 
#58787
Re:Date format and problem with server side paginatio 8 Years, 1 Month ago Karma: 760
Hello,

1. Populate "Columns settings -> ID" parameter with column name and "Columns settings -> Format" parameter with the following value:

{$value|date_format:d.m.Y}

2. Remove ORDER BY from SQL query,

Regards,
ARI Soft
The administrator has disabled public write access.
 
#58788
Re:Date format and problem with server side paginatio 8 Years, 1 Month ago Karma: 1
Hi


1. It works, thanks

2. Nope, still doesn't work. I tried it without ORDER as well.

This doesn't work:
...
third_reminder_sent_at,
from_date,
to_date
FROM
...

This works OK:
...
third_reminder_sent_at,
to_date
FROM
...


I wonder if maybe from_date is same like function name or with some regex
rule, and that's why it fails. Other than that I don't have any more clues.
I checked field name from_date million times

As soon as I turn off server pagination, query starts to work with from_date as well..
Krx
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#58793
Re:Date format and problem with server side paginatio 8 Years, 1 Month ago Karma: 760
Use the following query:

...
third_reminder_sent_at,
`from_date`,
to_date
FROM
...

Regards,
ARI Soft
The administrator has disabled public write access.
 
#58794
Re:Date format and problem with server side paginatio 8 Years, 1 Month ago Karma: 1
Hi

It works, thanks.
Any hint why it doesn't work without these: ` ?

EDIT:

NWM, I decided to investigate:
stackoverflow.com/questions/11321491/when-to-use-single-quotes-double-quotes-and-backticks

Thanks for the support.

Regards
Krx
User Offline Click here to see the profile of this user
Last Edit: 2016/10/19 08:14 By Krx.
The administrator has disabled public write access.
 
#58796
Re:Date format and problem with server side paginatio 8 Years, 1 Month ago Karma: 760
It is not an MySQL issue, this is a limitation of implementation server side pagination in "ARI Data Tables" extension. We will improve it in a future version of the extension.

Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 123