[PHP-DEV] PHP 4.0 Bug #7656 Updated: Problems with accents in column name From: fmk <email protected>
Date: 11/30/00

ID: 7656
Updated by: fmk
Reported By: walidm <email protected>
Status: Closed
Bug Type: MSSQL related
Assigned To:
Comments:

Testing this on windows 2000 gives the expected result.

This code:

$con = mssql_connect($db, $user, $password);
$rs = mssql_query("select * from phptest", $con);

while ($data = mssql_fetch_array($rs)) {
        print($data["marché"] . "\n");
        while (list($col, $dat) = each($data))
                print($col . "=" . "\n");
}
print("\n");
mssql_free_result($rs);
mssql_close($con);

Works when uses from the web server. If you use the same code from the command line you need to enter é in the correct code page.

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

[2000-11-06 03:36:34] walidm <email protected>
I'm french and I'm working on an already created MSSQL DB.
The problem is that some columns are "in french" which means that they contains an accent in their name and it seems that the MSSQL70 module from PHP 4.03 does not know how to deal with it.
Here is an example :
I have a table which contains a column called "marché".
With the query analyser from MSSQL70, my query is working perfectly but when I use the same query with PHP, it doesn't work and says that the column "marché" doesn't exist ...
If I try with any other column (without the accent), it works flawlessly so it s not a problem from my query ...
I can't change the name of the column, there is too much work relying on it so please, help me ...

Thanks.

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

Full Bug description available at: http://bugs.php.net/?id=7656

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>