|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11730 Cannot use uniqueidentifier
Submitted: 2001-06-27 05:15 UTC Modified: 2001-06-30 14:48 UTC
From: thomas dot reinig at onsoft dot de Assigned:
Status: Closed Package: MSSQL related
PHP Version: 4.0.6 OS: WINNT4.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
39 - 35 = ?
Subscribe to this entry?

 [2001-06-27 05:15 UTC] thomas dot reinig at onsoft dot de
(Apache 1.3.20, PHP4.0.6&4.0.4,MSSQL70)

Cannot work with the MSSQL-uniqueidentifier.
e.g. I need to use following select in php:

 select newid() as id;

normally I would get something like this

but the vars only get cryptical codes like
???g???O??w?ծ ?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-30 14:48 UTC]
UNIQUEIDENTIFYER is an alias for a 16 byte binary and as the support for binary data was changed between 4.0.5 and 4.0.6, the data returned is no longer converted to a readable string.

A new function will be introduced mssql_guid_string() in 4.0.7. This function can convert the binary value to a readable string.

If you dont want the extra call in your code, use this work arround:

select cast(id as varchar(36)) from my table
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 07:01:27 2024 UTC