Re: results over multiple pages
| From: | Hugh Bothwell | Date: | Tue, 07 May 2002 02:23:44 +0000 |
| Subject: | Re: results over multiple pages | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-13584@lists.php.net to get a copy of this message | ||
> if ($currentPage > 1) {
> $host="localhost";
> $DB="testDB";
> $user="sa";
> $pass="";
Umm... if that's the only place you use these values,
why not specify them inline? Easier to read, for sure.
> $connect = mssql_connect($host,$user,$pass) or die ($host." not
> accessible.");
> if ($DB) mssql_select_db($DB)or die('USE '.$DB.' failed!');
> $query = "SELECT first_name, last_name FROM individual WHERE last_name
> LIKE '$searchField%' ORDER by last_name ASC";
Surely LIMIT would be a better way to do this?