php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7656 Problems with accents in column name
Submitted: 2000-11-06 03:36 UTC Modified: 2000-11-30 21:12 UTC
From: walidm at sport-away dot com Assigned:
Status: Closed Package: MSSQL related
PHP Version: 4.0.3 OS: WinNT 4.0 & Win98se
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: walidm at sport-away dot com
New email:
PHP Version: OS:

 

 [2000-11-06 03:36 UTC] walidm at sport-away dot com
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-30 21:12 UTC] fmk@php.net
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.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Jun 28 18:05:44 2022 UTC