|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-09-14 08:13 UTC] sniper@php.net
[2005-09-22 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 18:00:02 2025 UTC |
Description: ------------ when returning a char type data type from ms sql the field has an added space at the end of it. This was not a problem in 4.3 and I just had to copy the php_mssql.dll from the old version to 4.4 and it corrected the problem. Reproduce code: --------------- I am calling a class to get the field: $SVars = new SessionVars(); $userid = $SVars->GetVar("username"); $query = "SELECT * FROM tSecUser WHERE (SecUser='" . $userid . "')"; $resultsec = $sqlw->sqlquery($query,$cn); $linesec = $sqlw->fetch_array($resultsec); echo "<P>*".$linesec["SecUser"]."*"; The echo statement displays *dgering * it should display *dgering* here is the class for SessionVars <? //Define the SessionVars class class SessionVars { var $seshid; var $varname; var $varvalue; Function SaveVar($VarName,$VarValue) { $sqlw = new sqlwrapper(); $cn = $sqlw->dbcn(); Function GetVar($VarName) { // connect to database $sqlw = new sqlwrapper(); $cn = $sqlw->dbcn(); // Retrieves Session Variable from SessVars Table $sqlquery = "SELECT VarValue FROM SessVars WHERE (SessionID = '" . $this->seshid . "') AND (VarName = '" . $VarName . "')"; $res = $sqlw->sqlquery($sqlquery, $cn); $row = $sqlw->fetch_row($res); return $row[0]; } } ?> Expected result: ---------------- The echo statement displays *dgering * Actual result: -------------- it should display *dgering*