Wierd problem using mssql

Do you have questions regarding other database enginges (not MySQL) -- ask here!

Moderators: macek, egami, gesf

okmacman
New php-forum User
New php-forum User
Posts: 3
Joined: Fri Oct 28, 2011 12:54 pm

Wierd problem using mssql

Postby okmacman » Fri Oct 28, 2011 1:19 pm

I have an application running on FreeBSD Unix that is running just fine. I want to move it to an ubuntu server (11.10).
PHP 5.3.6-13ubuntu3.2
Apache 2.2.20

The query resides in a function that looks up a permit using the permit number. I call the function with the permit number. If the query returns no result, everything works.

If the query returns a result, strange things happen.
Run from the CLI, the script will display the results, but will NOT return from the function. It just ends when the function ends.
Run from a web browser, it returns an undefined response code.

If I move the query from the function into the main code, the script continues until the end in CLI, but still returns an undefined response code in a web browser.

I have another script on the same machine that query's another mssql server that works just fine - no problems whatsoever in either CLI or from a web browser.

As I don't have much hair left to pull out, please accept my thanks in advance.

Chris

okmacman
New php-forum User
New php-forum User
Posts: 3
Joined: Fri Oct 28, 2011 12:54 pm

Wierd problem using mssql - more info

Postby okmacman » Fri Oct 28, 2011 1:47 pm

Okay, playing around, if I use a query such as:

SELECT * FROM AlarmPermits WHERE PermitNumber="11"

It fails as described above. However, if I list the fields I want:

SELECT PermitNumber, AddressID, JacketID FROM AlarmPermits WHERE PermitNumber="11"

It works just fine.

Any ideas on this???

Chris

okmacman
New php-forum User
New php-forum User
Posts: 3
Joined: Fri Oct 28, 2011 12:54 pm

Wierd problem using mssql - even more info

Postby okmacman » Fri Oct 28, 2011 1:55 pm

The MSSQL server that works just fine with SELECT * is 2008 R2, the one that doesn't is 2008 SP2...

Chris


Return to “Other Database Engines”

Who is online

Users browsing this forum: No registered users and 2 guests

cron