Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Dec 2010
    Location
    Gatineau, QUEBEC, CANADA
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts

    MySql database table has a field with XML data

    Hello all,

    I have created my site using WordPress and used FormBuilder as a plug-in to create forms.

    I have a MySQL database which contains several tables. One of the tables has 3 fields, one of which is called "xmldata" which holds information entered in the Formbuilder's form.

    I would like to be able to retrieve the "xmldata" in a legible way and not "bundled up". Is there a query that can be used to "unbundle" the information in the field?

    Thanking you in advance!!

    Marc

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,508
    Thanks
    77
    Thanked 4,378 Times in 4,343 Posts
    Where do you want to do the unbundling? In PHP code or in JS code in the browser?

    What will you try to do with the unbundled info? Do all the records use the same XML layout?
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    New to the CF scene
    Join Date
    Dec 2010
    Location
    Gatineau, QUEBEC, CANADA
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thank you Old Pedant for your answer...

    In want to unbundle in a stating page as a listing. I would like to do it in PHP, and yes, they all use the same XML layout!

  • #4
    Super Moderator guelphdad's Avatar
    Join Date
    Mar 2006
    Location
    St. Catharines, Ontario Canada
    Posts
    2,634
    Thanks
    4
    Thanked 148 Times in 139 Posts
    right so you'd just retrieve the info as is from mysql and explode the data as necessary with PHP. If you have problems understanding how to do that post the XML data in a thread in the PHP forum as you are likely to get more help with experienced PHP coders in that forum.

  • Users who have thanked guelphdad for this post:

    mtherrie (12-16-2011)

  • #5
    New to the CF scene
    Join Date
    Dec 2010
    Location
    Gatineau, QUEBEC, CANADA
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Thumbs up

    Thanks Guelphdad... I will do that!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •