Welcome Guest, Not a member yet? Register   Sign In
list output from recent to previous?
#1

[eluser]newbie boy[/eluser]
i need to know how can i list the ouputs from my database
which the recent input will on top and the previous will on the bottom.

my code is this:

Code:
<?php echo date("mdY",$value['date']); ?>

which outputs data from previous on top and the recent will be on the bottom.


thanks guys...
#2

[eluser]cwt137[/eluser]
please post your query
#3

[eluser]newbie boy[/eluser]
sorry for that but here's my query:

Code:
$data['date']= $DateModel;

which comes from:

Code:
$data['date'] = $this->input->post('date');
#4

[eluser]newbie boy[/eluser]
i found this native mysql code

Code:
$query = "SELECT * FROM table ORDER BY datevariable DESC";

how will i covert it in form of a MVC framework?

i think this will help.
#5

[eluser]newbie boy[/eluser]
can anyone help me?

i would really appreciate it!
#6

[eluser]Thorpe Obazee[/eluser]
Dude. You need to give us the problem. paste more code and explain the situation clearly.
#7

[eluser]newbie boy[/eluser]
I need to ouput an educational record of a user from the recent down to the previous.

For example is list down from college down to primary dates attended.

here's my code again:

for the conroller (from the user)
Code:
$data['date'] = $this->input->post('date');

for the model:
Code:
$data['date']= $DateModel;

for the view:
Code:
<?php echo date("mdY",$value['date']); ?>

i hopes this make it clearer.




Theme © iAndrew 2016 - Forum software by © MyBB