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 3758724
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T10:12:22+00:00 2026-05-19T10:12:22+00:00

I am writing an integration piece between Drupal/Ubercart and a in-house admin system. The

  • 0

I am writing an integration piece between Drupal/Ubercart and a in-house admin system.

The customer uses Ubercart products with attributes (e.g. a Plaque, which can contain a name, a company, a registration date and month). When an order is placed, the values entered for the attributes are written to uc_order_products, where the data field contains the actual values entered by the user. As far as I can tell, this is the only place where product attributes values, as entered by an end user to place an order, is stored.

The encoded attribute values uses a format seen all over Drupal tables to encode objects:

a:3:{s:10:"attributes";a:4:{s:26:"Name (to appear on plaque)";a:1:{i:0;s:10:"Some  
Namee";}s:7:"Company";a:1:{i:0;s:28:"Some Company Name Goes here_";}s:19:"Certification 
Month";a:1:{i:0;s:0:"";}s:18:"Certification Year";a:1:
{i:0;s:4:"2011";}}s:9:"shippable";s:1:"1";s:6:"module";s:10:"uc_product";}

And expanded, it looks like this:

a:3:
{
    s:10:"attributes";
    a:4:
        {
            s:26:"Name (to appear on plaque)";
            a:1:
                {
                    i:0;
                    s:10:"Some Namee";
                }
            s:7:"Company";
            a:1:
                {
                    i:0;
                    s:28:"Some Company Name Goes Herep";
                }
            s:19:"Certification Month";
            a:1:
                {
                    i:0;
                    s:0:"";
                }
            s:18:"Certification Year";
            a:1:
                {
                    i:0;
                    s:4:"2011";
                }
        }
    s:9:"shippable";
    s:1:"1";
    s:6:"module";
    s:10:"uc_product";
}

I there a simple way to get to the individual field values within this text using SQL? I can write a SQL function to go look for specifics, but I’d like to know if someone knows of an existing MySQL approach (perhaps within Drupal) which would do this.

Thanks!

  • 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-19T10:12:23+00:00Added an answer on May 19, 2026 at 10:12 am

    Don’t know if any built-in solution exists, but I ended up writing a SQL Function which takes as parameter text such as Name (to appear on plaque). The function then locates the text and extracts the succeeding { ... } block and from it retrieves the corresponding string value. Rough, but works in this case.

    If someone has a better solution, I’d like to hear about it!

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

Sidebar

Related Questions

I'm writing an integration between Salesforce.com and another service, and I've hit a problem
I'm writing a physics engine that uses Verlet integration, and i can't get some
I am writing a set of integration tests (Unit tests with MS Test which
I am currently writing integration/functional tests for my system. Part of the functionality is
I'm currently writing a plugin for our integration server that uses libxml2's xmllint command
I'm writing a tool to run a series of integration tests on my product.
I'm writing an integration test for a rails application using Capybara within Rspec. After
I'm writing some integration tests for a Spring/Hibernate app I'm working on, and I
I'm writing an integration tests for my database, and I've got one question. At
I'm writing an integration test for a rails application using webrat. After filling out

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.