ID:               34784
 Comment by:       mcollard at hotmail dot com
 Reported By:      jwall at webpeak dot com
 Status:           Assigned
 Bug Type:         MSSQL related
 Operating System: Windows XP
 PHP Version:      5CVS-2005-10-08 (snap)
 Assigned To:      fmk
 New Comment:

This also happens for me in PHP 4.4.0 build of MSSQL.dll.


Previous Comments:
------------------------------------------------------------------------

[2005-10-08 14:27:18] [EMAIL PROTECTED]

Frank, can you check this out?


------------------------------------------------------------------------

[2005-10-08 02:32:46] jwall at webpeak dot com

I tried http://snaps.php.net/win32/php5-win32-latest.zip
(5.1.0RC2-dev). This yields the same results.

------------------------------------------------------------------------

[2005-10-08 01:33:47] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip



------------------------------------------------------------------------

[2005-10-07 22:53:05] jwall at webpeak dot com

Description:
------------
PHP 5.05/Sybase 12.53/php_mssql.dll

When doing a SELECT with > 33 columns, error:

[Native Error: Changed database context to 'my_db'.]

If the SQL is input via isql it works with no errors.

Reproduce code:
---------------
$link=mssql_pconnect('10.37.3.20,11222','sa','');
mssql_select_db('my_db',$link);

// limit of 33 columns allowed in select (so this fails)
$result=mssql_query("SELECT pr_0_6.prRN, pr_0_6.prDO, pr_0_6.prAC,
pr_0_6.prCS, pr_0_6.prUS, pr_0_6.prHN, pr_0_6.prHS, pr_0_6.prSS,
pr_0_6.d22, pr_0_6.d23, pr_0_6.d24, pr_0_6.d53, pr_0_6.l13,
pr_0_5.prRN, pr_0_5.prDO, pr_0_5.prAC, pr_0_5.prCS, pr_0_5.prUS,
pr_0_5.prHN, pr_0_5.prHS, pr_0_5.prSS, pr_0_5.d20, pr_0_5.d21,
pr_0_5.d74, pr_0_5.d177, pr_0_5.d75, pr_0_5.d85, pr_0_5.d37,
pr_0_5.d76, pr_0_5.d173, pr_0_5.d219, pr_0_5.d143, pr_0_5.d40,
pr_0_5.d38, pr_0_5.d39, pr_0_5.d272, pr_0_5.d273, pr_0_5.d302 FROM
pr_0_6, pr_0_5 WHERE pr_0_5.d21 LIKE 'A%' AND
pr_0_6.l13=pr_0_5.prRN");

if (!$result) {
    plog('Could not execute query ' . mssql_get_last_message());
}
while($row=mssql_fetch_row($result)) {
    plog("row: " . dumpVar($row));
}
mssql_close($link);


Expected result:
----------------
Expected results is a log with each results array for every record
returned. If I reduce the SELECT to < 34 then expected results are
returned.

Actual result:
--------------
A log indicating the error:

Could not execute query Changed database context to 'my_db'.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=34784&edit=1

Reply via email to