<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1016922" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1016922</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/sorting-acs-and-desc#comment-1098442</link>
    <description> &lt;p&gt;OK. Now, using the information I provided in the above post you can modify this query to be sorted by a paticular field.&lt;/p&gt;
&lt;p&gt;Pass the order you want the results to the script. If no order is passed, I&#039;ll assume that you want them sorted by &quot;uname&quot;.&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;$sort = $query-&amp;gt;param(&amp;#039;sort&amp;#039;) || &amp;quot;uname&amp;quot;;&lt;br /&gt;&lt;br /&gt;$sql = &amp;quot;select date, uname, exsal from biopersonal where publish=&amp;#039;y&amp;#039; &lt;br /&gt;and (job=&amp;#039;database&amp;#039; or job1=&amp;#039;database&amp;#039; or job2=&amp;#039;database&amp;#039;) &amp;lt;strong&amp;gt;ORDER BY $sort&amp;lt;/strong&amp;gt;&amp;quot;;&lt;br /&gt;&lt;br /&gt;$result = mysql_query($sql);&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;[ untested code ]&lt;/p&gt;
 </description>
     <pubDate>Wed, 16 Jan 2002 11:05:48 +0000</pubDate>
 <dc:creator>Wil</dc:creator>
 <guid isPermaLink="false">comment 1098442 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/sorting-acs-and-desc#comment-1098441</link>
    <description> &lt;p&gt;this is the $query i used to select out the records..&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;$sql &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;select date, uname, exsal from biopersonal where publish=&#039;y&#039; and (job=&#039;database&#039; or job1=&#039;database&#039; or job2=&#039;database&#039;)\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$result&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=mysql_query(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$sql&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Wed, 16 Jan 2002 09:58:10 +0000</pubDate>
 <dc:creator>joyce</dc:creator>
 <guid isPermaLink="false">comment 1098441 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/sorting-acs-and-desc#comment-1098440</link>
    <description> &lt;p&gt;By using ORDER BY and passing the field you want ordered by to the script. Your script will then query the database using the ORDER BY field passed to it.&lt;/p&gt;
&lt;p&gt;To get the correct up/down images, you will need to establish what value the sort order is, and then do a conditional statement to work out what image to display.&lt;/p&gt;
&lt;p&gt;Have you done any coding yet? If so, could you post the relevant bits? As in, how are you retrieving the records from the database?&lt;/p&gt;
 </description>
     <pubDate>Wed, 16 Jan 2002 09:51:37 +0000</pubDate>
 <dc:creator>Wil</dc:creator>
 <guid isPermaLink="false">comment 1098440 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/sorting-acs-and-desc#comment-1098439</link>
    <description> &lt;p&gt;i have this three field:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;print \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&amp;lt;tr&amp;gt;&amp;lt;td width=30% bgcolor=#9999ff align=center&amp;gt;&amp;lt;font face=verdana color=#ffffff size=1&amp;gt;Date&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;\n\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print \&quot;&amp;lt;td width=40% bgcolor=#9999ff align=center&amp;gt;&amp;lt;font face=verdana color=#ffffff size=1&amp;gt;Name&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;\n\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print \&quot;&amp;lt;td width=30% bgcolor=#9999ff align=center&amp;gt;&amp;lt;font face=verdana color=#ffffff size=1&amp;gt;Expected Salary&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;\n\&quot;;&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;they are actually titles, below them will have a list of records. how am i going to do it in such a way that when i clicked the title &#039;name, all the records i have below will sort by acsending and an arrow pointing up and when i clicked one more time, they will sort by descending order and an arrow pointing down.&lt;/p&gt;
 </description>
     <pubDate>Wed, 16 Jan 2002 09:43:52 +0000</pubDate>
 <dc:creator>joyce</dc:creator>
 <guid isPermaLink="false">comment 1098439 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/sorting-acs-and-desc#comment-1098438</link>
    <description> &lt;p&gt;You&#039;re using a SELECT statment on a SQL database, right? It&#039;s quite hard to help you without more information, but usually you just need to tell your SQL server in what order you want the results returned.&lt;/p&gt;
&lt;p&gt;You need something like this:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;SELECT field FROM database ORDER BY field&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
 </description>
     <pubDate>Wed, 16 Jan 2002 09:37:21 +0000</pubDate>
 <dc:creator>Wil</dc:creator>
 <guid isPermaLink="false">comment 1098438 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
