Conditional if for this code

Code:
	$newforumcache = $vbulletin->db->query_read("
		SELECT forum.*" . (VB_AREA != 'Upgrade' ? ", NOT ISNULL(podcast.forumid) AS podcast" : "") . "
		FROM " . TABLE_PREFIX . "forum AS forum
		" . (VB_AREA != 'Upgrade' ? "LEFT JOIN " . TABLE_PREFIX . "podcast AS podcast ON (forum.forumid = podcast.forumid AND podcast.enabled = 1)" : "") . "
		[b]ORDER BY displaytitle[/b]
I'm trying to get 2 of my forums to sort by title by default but I have no idea how to do an if statement for this code

I'm looking for something like

<if condition="$forumid == '1'">ORDER BY title</if>
} else {
ORDER BY displayorder

O_O i dunno like I said I'm a total newb with php

Can someone write this for me or is there any other way to set the default sort field for subforums? Been looking around all day...

Thanks for any help.
 
bang said:
I found this query

Code:
UPDATE forum SET defaultsortfield ='title';

except it sets the settings to all forums. Does anyone know how to exclude forumid?


PHP:
<if condition="$forumid != '1'"> %-code-% </if>

Check my sig for conditionals list ;)
 
Back
Top