Re: ODBC Functions & MS SQL Server 2005
| From: | Dan Joseph | Date: | Thu, 18 Sep 2008 20:21:27 +0000 |
| Subject: | Re: ODBC Functions & MS SQL Server 2005 | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-280462@lists.php.net to get a copy of this message | ||
On Thu, Sep 18, 2008 at 3:36 PM, Dan Shirah <mrsquash2@gmail.com> wrote:
>
> If you already have your results in an array, try using count($result);
> That should count the number of results returned to your result array.
>
> Or you could try uncommenting the mssql extension in your php.ini file and
> then try using:
>
> mssql_num_rows() ?
>
> Dan
>
>
>
>
I don't have them in an array usually, I just cycle thru each row.
I've thought about using the mssql_* functions. My boss originally pushed
me into odbc posing the question "What if we move to a different database
server type?".
I do have a class for handling all the database functions. Maybe I'll just
go that route. If he changed to Oracle or something, I could modify my
class easy enough.
I'm assuming mssql_num_rows() works fine when calling a stored procedure?
--
-Dan Joseph
www.canishosting.com - Plans start @ $1.99/month.
"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."