need help quickly understand this line of code!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
clarkluke
Forum Newbie
Posts: 3
Joined: Tue Dec 08, 2009 1:57 pm

need help quickly understand this line of code!

Post by clarkluke »

I am supposing this is the line of code that affects what I need to change.

$files =& get_children('post_parent='.$post->ID.'&post_type=attachment&post_mime_type=application/pdf&order=ASC');

I need to change that line of code to tell the script to order it by the title of the attachment when they view the files from a drop down. Right now it is doing it by date with the oldest at the bottom. Thanks in advance!
incubi
Forum Contributor
Posts: 119
Joined: Mon Dec 07, 2009 1:47 pm

Re: need help quickly understand this line of code!

Post by incubi »

Hi,

I'm not a pro by any means but I would need to see the routine that handles
order=ASC

If its simply formatting for an SQL query then ORDER BY attachment ASC
would be the change needed.

incubi
clarkluke
Forum Newbie
Posts: 3
Joined: Tue Dec 08, 2009 1:57 pm

Re: need help quickly understand this line of code!

Post by clarkluke »

I figured it out. after order I just had to put "orderby=title&order=ASC"


Thanks for the help!
Post Reply