I don't think SQL Server supports the LIMIT statement  (this isn't MySQL
remember...)
>From memory SQL Server uses the TOP statement - something like
"SELECT TOP 5 <rest of SQL statement here...>" although I'm probably wildly
off as far as syntax goes.
You can also use a percentage for the number of rows you want.

Hope that helps...

Matt

"Hugh Bothwell" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> > 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?
>
>
>



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

Reply via email to