How to Sorting my Tables Fields? |
[eluser]Jauhari[/eluser]
I am newbie in CI and I really enjoy with this framework. I have question about how to sort or add where condition. This is my detail problem. I was made some tabular data with some field, example name and email. then I was succesfully display my tabular data on my view. My Question is, how to sorting my data? on my tables I have some date added. And I want make simple form, where I can input some value (example input data added on 2/2/2008 only) and my tabular data automatically will change to current data on 2/2/2008 only. How to do that? please help me. I was try add this code on my controllers Code: function address() { And code on my Views Code: <form action="" method="POST"> But my sorting doesn't work ![]() Please Help Me
[eluser]ontguy[/eluser]
You could use order to sort by date, for the initial sort $this->db->order_by('date'); A javascript sort could be done: http://madhatted.com/2008/1/16/the-joy-o...table-sort You could use ajax to refresh the table with the current row in a input field, then the full table when the text is removed, here are a couple examples : http://www.phatfusion.net/sortabletable/index.htm http://ideamill.synaptrixgroup.com/jquer...letest.htm
[eluser]Jauhari[/eluser]
Hi OntGuy That I need to do is make limitations on some dates only. So I have some form with some input field and I can input some date and when I click submit, the list will be show up data on my current date How to do that? Thanks
[eluser]Avatar[/eluser]
you may need to call a separate query like so: Code: $q=$this->db->query('select * from `table` where `date`="'.$date.'"'); |
Welcome Guest, Not a member yet? Register Sign In |