RE: [PHP-DB] Order DB through url toggle

From: Date: Fri, 08 Nov 2002 16:50:54 +0000
Subject: RE: [PHP-DB] Order DB through url toggle
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-23152@lists.php.net to get a copy of this message
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

« previous php.db (#23152) next »