Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7572811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:01:13+00:00 2026-05-30T16:01:13+00:00

I have a C# .NET 3.5 application using the ADO.NET Driver for MySQL (Connector/NET).

  • 0

I have a C# .NET 3.5 application using the ADO.NET Driver for MySQL (Connector/NET). It stores a Guid.NewGuid() in the MySQL database as a BINARY(16).

I have another application using PHP 5.3.4 that needs to be able to read that binary value as a GUID string and encode a GUID string in the same 16-byte binary value.

As an example I want to be able to convert between these two things:

GUID string: E241346C-504F-4BE5-BDF3-1B8274815597
BINARY(16): 65 32 34 31 33 34 36 63 2d 35 30 34 66 2d 34 62

How can I do this in PHP?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T16:01:15+00:00Added an answer on May 30, 2026 at 4:01 pm

    The problem was that the field was BINARY(16), but the My SQL connector was trying to store a CHAR(36) in there. (They changed the way GUIDs were formatted in v6.1.1)
    So, the last 20 bytes of my GUID were being silently truncated. (I do not know why the connector didn’t throw an exception.)

    Once I changed the database to store GUIDs as a CHAR(36), it worked fine. Alternatively, I could have use the oldguids=true element in my connection string.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a asp.net application in that I am using ado.net entity framework in
I have decided to move my C# daemon application (using dotConnect as ADO.NET provider)
I have a C# application, using ADO.Net to connect to MSSQL I need to
I have a simple application using ADO.NET EntityFramework using a many-to-many relationship between two
I have a C# .net 3.5 application using an ADO.NET Entity Data Model. I
I have been using ADO.net since 2002/2003 and most of the application I have
I have an ASP.NET application using the Telerik Q1 2009 controls. I have a
I have compiled a .NET application using Any CPU option. This .NET application uses
I have an ASP.NET MVC application using Authorization Attributes on Controllers and Actions. This
I have a ASP.NET MVC application using NHibernate and the application runs fine when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.