php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: thomas dot reinig at onsoft dot de
New email:
PHP Version: OS:

 

 [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
id="{874E725E-03A0-44C7-BB0B-E52C7EC74B9F}"

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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-30 14:48 UTC] fmk@php.net
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 09:01:27 2024 UTC