Ignited Datatables // php library - Page 2

Ignited Datatables // php library

Replies

Is there a workaround for the aLengthMenu option for displaying all compounds? I originally had it as
"aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
But when the user selects "Show All" it only shows the default selection

Hi
Could someone explain to me the workings of the following piece of code:
->add('edit', 'Edit', 'customer_id, first_name, last_name')
what do the $1 $2 $3 in the string stand for.
I'm trying to use this line for a link to go off and edit a record on another page which would be filtered by lets say the customer_id, but I am not having much joy.
I've tried changing the href to

Got it to work with the following method
->add('edit', 'pay', 'purchase_invoice_id');
shows http://192.168.1.81/cloudone/pay_invoice.php?inv=3 in the address bar.

so alls good, thank you for your help, are you able to point me in the direction of an example on how to format the following two items, returned date like 2013-04-14 to display like 14-04-2013 04 or 14/04/2013 in keeping with the UK and 23.00 to £23.00.
Thank you

Yusuf,
Thanks for the reply. I understand now about that unset_column method. i commented it out.
As for the $.ajax type?? Every time I change it to a POST, I get a Error Code 500 from the XAMPP. It points back to my home/datatable ci function and it says that the action I have requested is not allowed. Why would this happen with POST and not GET??

which is fine for a one-to-one relationship. However, if I have a one-to-many relationship, how can I get just the oldest many_value from the many table? I'd typically use a sub query but I don't understand how to integrate that into the above select.

Thanks for the response -- unfortunately, I may not have been as descriptive as I should have been as your solution mimics what I've got (which is fine for one-to-one) and gives me a record for each [Service Note] instead of just the most recent. Here's a more concrete example:

[ Service Ticket ]
ST_ID
ST_Request

[ Service Note ]
SN_ID
SN_Value
SN_Date
SN_ST_ID

A given [Service Ticket] can have multiple [Service Note] records. What I would typically use for my SQL would be:

Wow, okay -- it does work with a minor change (LIMIT instead of TOP) although it seems to defeat some of the value of using your toolset. I think I may just put the latest [Service Note].ID in the [Service Ticket] and grab it that way to simplify the code/query.

The edit_column is not working as it should be. It outputs whatever I put as the 3rd param.
Also. If in the SQL I am using a function i.e: group_concat(field) the where and like is applied to that function too when doing a searc, causing an error in the query.
I am using version 1.9