RE: Order DB through url toggle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Guys..
This seemed to do the trick

/* and the desc asc */
$dir = ((isset ($_GET['dir'])) ? (int) $_GET['dir'] : 1);
if (!$dir)
$dir = ($dir ? 0 : 1);

if ($HTTP_GET_VARS['dir'] == 0) {
  $diri = 'DESC';
  } 
if ($HTTP_GET_VARS['dir'] == 1) {
  $diri = 'ASC';
  }   

mysql_select_db($database_myFirstSql, $myFirstSql);
$query_rsAll = "SELECT * FROM userinfo ORDER BY $orderBy $diri";

-paul

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux