• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ignited DataTables

#21
[eluser]nicusors[/eluser]
Great post and contributions.

I am at the point where have to build lots of reports and this looks like the best and easy way to accomplish it. Just found it today and I'm so happy. So I can't wait to see the joins development.

Thanks, nick

#22
[eluser]nicusors[/eluser]
Hi ruizpi,

There is a small mistake on get_filtering. The search is not working. Here is the working updated version.

Code:
protected function get_filtering($columns, $where, $search)
    {
      $sWhere="";
      $TieneParentesis=0;
      if ($where!="")
      {
         $sWhere .=$where;
      }


      if($this->input->post("sSearch") != "")
      {

        if ($sWhere!="")
        {
            $sWhere.=" AND (";
            $TieneParentesis=1;
        }

        for($i = 0; $i < count($columns); $i++)
          $sWhere .= $columns[$i] . " LIKE '%" . $this->input->post("sSearch") . "%' OR ";

        $sWhere = substr_replace($sWhere, "", -3);
        if ($TieneParentesis==1)
            $sWhere.=")";
      }

      if ($sWhere <>"")
          $sWhere = "WHERE " . $sWhere;
      return $sWhere;
    }

#23
[eluser]ruizpi[/eluser]
hi nicusors,

I try to test your modification but when i use a group by select it doesn't work. Test it.

#24
[eluser]ruizpi[/eluser]
At this point my code that i share with you works fine with querys. I try to filter for 1 column like some examples that create some boxes at the bottom of the table. It doesn't work with server side processing like my code do. Can anybody help me?

#25
[eluser]cryogenix[/eluser]
hey guys, i updated the first post and added an initial draft for the "library" version... i haven't tested it out yet so i was hoping some kind soul can do the testing for me Tongue i haven't added joins on this one yet as im still pretty much preoccupied... i did add a zip download too if you want...

do send me feedbacks on this...

cheers

#26
[eluser]Clooner[/eluser]
I used your code and with a regular request the json file seems fine however when using a post request the following error is generated

Code:
An Error Was Encountered.
The action you have requested is not allowed.

It's my bedtime now. I'll dive into this tomorrow or maybe someone has a solution for me when I wake up Big Grin

#27
[eluser]cryogenix[/eluser]
that's a CI2 problem right? perhaps you could find your answer here: http://ellislab.com/forums/viewthread/163976/#786244

#28
[eluser]Clooner[/eluser]
[quote author="cryogenix" date="1287845929"]that's a CI2 problem right? perhaps you could find your answer here: http://ellislab.com/forums/viewthread/163976/#786244[/quote]
Thanks that was the problem...

Is there anything already that takes care of queries with joins?

#29
[eluser]Clooner[/eluser]
[quote author="Jeroen Schaftenaar" date="1287864864"][quote author="cryogenix" date="1287845929"]that's a CI2 problem right? perhaps you could find your answer here: http://ellislab.com/forums/viewthread/163976/#786244[/quote]
Thanks that was the problem...

Is there anything already that takes care of queries with joins?[/quote]

I found the joins version already on
http://ellislab.com/forums/viewthread/164729/

#30
[eluser]Dermis[/eluser]
great works cryogenix,
i've tried your solution integrating CI with Datatables using server side processing. however i cant display pagination. It seems like your datatables library produce table with some bugs with your css.
Im using two_button pagination, but NEXT and PREVIOUS button didnot appear. I've imported css file correctly.
Any idea for me to debug this?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.