MySQL PHP XML not sorted in the right order

Hi, maybe someone can point out to me where I go wrong.
I use an XML derived with PHP from a MySQL database to loop through a series of pictures.
The XML I get from a database query gets sorted in the wrong order.
I try to sort it by orde (is a columnname) but it keeps sorting by the ID.
Any help is greatly appreciated.
Thanks
This is the PHP code to create the XML:
$link = mysql_connect("localhost", "xxxx", "xxxxxxxxx");
mysql_select_db("xxxxxxxxxxx");
$query = 'SELECT * FROM gallery WHERE categorie = "dessin" ORDER BY "orde" ASC';
$results = mysql_query($query);
echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
echo "<dataLoaded>\n";
while ($line = mysql_fetch_assoc($results)) {
echo "<galerie>\n";
echo "<id>" . $line["gallery_id"] . "</id>\n";
echo "<orde>" . $line["orde"] . "</orde>\n";
echo "<image><![CDATA[" . $line["starturl"] . $line["image"] . $line["endurl"] . "]]></image>\n";
echo "</galerie>\n";
echo "</dataLoaded>\n";
mysql_close($link);

Thanks Kglad. Didn't work though.
I also looked it up in the PHP reference with mysql_fetch_row you need to specify a single row I understand.
In this case it might be many and the number differs.
But I found the solution. I removed the quotes around orde and now it works.
$query = 'SELECT orde, starturl, image, endurl FROM gallery WHERE categorie ="dessin" ORDER BY orde ASC';
Nevertheless thank you and others for the great help on these forums.
Jos

Similar Messages

  • Idocs are not processed in the right order.

    Hi,
    I face a problem that when there are a large number of IDocs (Inbound) posted the Idocs are not processed in the right order.
    Msg type: MBGMCR
    any idea how this can happen?
    what is the solution?
    br
    Karen

    No answer

  • Transfer key pictures and events sorted in the right order to iPhone

    I have organized all events in iPhoto somewhat like this:
    2010-04-01 Event 1
    2010-04-03 Event 2
    etc
    The events are nicely sorted by the dates in iPhoto ..... but not in the iPhone, where some are just displayed in a different sequence.
    Also the key pictures are not transferred to the iPhone.

    actually there was, but let me try again
    on iPhoto the events are sorted nicely according to folder names, but after synchronization to the iPhone the events on the iPhone are sorted more like last added event. How to achieve on the iPhone the same sorting as in iPhoto?
    At the same time the defined key photos are not transferred to the iPhone. How to do this?

  • Using ipad1, why do my pictures in a new folder i just ceated are not in a good order? all my other older folders are in the right order but not the last one i synchronised

    I never had this problem before. My photos are mixed in my new folder of my IPad1 with ios version 5.1.1
    . Usually, they are in alphabetical order like in any usual folder, but not this time .I synchronised with ITunes with the usb connector. How can I put back in the right order my pictures? I was just told (by apple's help desk) that IPad IOS 5.1.1 sorts photos by the last date modified instead of by alphanumerical order. What a foolish idea? Is there something we can do about this? Thanks!  Robert

    all the pictures appear but can only be shown clicking in the Catalog Panel in LR, they are all included within the ¨all pictures¨  and in ¨ Previus import ¨ ... the previus import are all the photos i cannot see within folders ..
    Let me see how can i show you a screen capture and send it, I think this would explain better the situation
    Yes, when i click show in finder, it takes me to the HD and shows me the right folder the picture is in.  The folders in the HD show the order and titles i  defined on lightroom .. so the folders i defined in lightroom were registered correctly in the HD but are no longer shown in the folder panel in LR

  • When I sort bookmarks in "organize bookmarks" they are not sorted under the bookmarks pulldown menu. Latest additions are not integrated into the sort

    When I sort bookmarks in "Organize Bookmarks" they are not sorted under the pulldown menu on a regular page. Recently added bookmarks are not inegrated into to sorting.

    See this:
    [https://support.mozilla.com/en-US/kb/Sorting+bookmarks#Sorting_by_name]

  • Add new tab button does not appear at the right of the previous tab

    Just upgraded to Firefox 4 and the plus sign (T) for a new tab does not appear on the right of the previous tab as it had in earlier versions. I thought it was there briefly after I upgraded but it's not there anymore. How do I get it back? I did download the extension "new tab at the end" but that didn't help....

    That button should be available by default. However, if you use tab related Add-ons it may not show up as expected. You can add it back by right clicking on the navigation bar, clicking Customize, then drag the New Tab icon to the right end of tab bar.
    If that doesn't work, please try starting Firefox in Safemode to see if add-ons are indeed interfering.

  • HT204093 the body of my email does not appear to the right when I select a mail message.

    The body of incoming mail messages do not appear to the right when I select a mail message?
    Anybody know how to adjust this?
    Jgm

    Hello!
    Please try these steps: Can't see email message content

  • Can I shrink the iTunes webpage on my PC monitor so it does not cut off the right and left margins?

    Can I shrink the iTunes webpage on my PC monitor slightly so it does not cut off the right and left margins?

    Can you?  Are you capable of resizing the window?
    Only you can answer that question.
    If you want to know if it is possible, yes, it is possible.

  • Why is my secondary click is not working on the right?

    why is my secondary click is not working on the right?

    system preferences/Trackpad/point and click
    check and uncheck secondary click or alter method
    Try SMC reset
    http://support.apple.com/kb/HT3964
    Pram Reset
    http://support.apple.com/kb/ht1379

  • Pdf not saving on the right location

    pdf not saving on the right location

    Are you downloading pdfs using a web browser? An attachments from an email program? What OS are you using? What programs are you using? Give version numbers? What steps are you using to save the pdf?

  • I have put several clips with transitions into the timeline in final cut pro. There are two clips which are followed by transitions which do not play at the right speed. It is extremely frustrating, can anyone help?

    I have put several clips with transitions into the timeline in final cut pro X. There are two separate clips which are followed by transitions which do not play at the right speed. I'm at a loss as to why this is happening - any thoughts/help?

    The two HD clips were purchased from itunes (MPEG - 4) and converted to .mov for use in Final Cut Pro. Project properties - 720p HD 1280x720 (60p)
    Is this enough information?

  • CDs will not appear in iTunes in the right order

    I have got a set of discs of somebody reading a story over six CDs. When I put them in my Mac and ask iTunes to copy them (so that I can transfer them to my Fourth Generation iPod) it cannot put the discs in the right order. Some of the disc tracks have chapter names, some of the disc tracks are merely labelled 1, 2, 3, 4 and so on. How can I get the discs into the right order so that I can hear from disc 1 to disc 6 on my iPod? Any help gratefully received. Thanks.

    This happened to me. Check and make sure that you don't have "shuffle" on. You'll need to check on your "settings".
    Also, did you download them in the order you wanted?

  • How do you get photo slideshows in the right order on Ipod Video

    When I download my photos from my computer (Windows XP) they do not come out in the right order on my Ipod. How do I get my photos to come out in the same order as I have them on my computer? In My Pictures on Windows I arrange icons by date taken and this is how I want them on Ipod.
    Hope some genius can help me.

    Manahanb, which program are you using to make the slideshow and which OS?
    When requesting help, you should always include the make/model of the computer and/or monitor. This information is necessary for us to review the specifications of the them.
    Signature:
    HP TouchPad - 1.2 GHz; 1 GB memory; 32 GB storage; WebOS/CyanogenMod 11(Kit Kat)
    HP 10 Plus; Android-Kit Kat; 1.0 GHz Allwinner A31 ARM Cortex A7 Quad Core Processor ; 2GB RAM Memory Long: 2 GB DDR3L SDRAM (1600MHz); 16GB disable eMMC 16GB v4.51
    HP Omen; i7-4710QH; 8 GB memory; 256 GB San Disk SSD; Win 8.1
    HP Photosmart 7520 AIO
    ++++++++++++++++++
    **Click the Thumbs Up+ to say 'Thanks' and the 'Accept as Solution' if I have solved your problem.**
    Intelligence is God given; Wisdom is the sum of our mistakes!
    I am not an HP employee.

  • Split a FOUR sheet page into FOUR page in the right Order

    Hei,
    I have a PDF file in which every page is filled with four singel sheets (pages). The owner made this to save paper for printing. To make it more clear: page 1,2,3 and 4 are on ONE single page. Now I want to split them again to have page 1 on one page, page 2 on one page, page 3 on one page and page 4 on one page and so on. The document contains 50 page with four pages on every page. In sum it will be 200 pages in the end.
    I am searching the net for hours now for a solution and can´t find ANY! I managed to split the pages (in a lot of work) and merged them together in a new document. The order is wrong now: 1,5,9 till 50 and then its 2,6,10 and so on. I really don´t want to order 200 pages by hand... and there are more documents (four files) with the same problem.
    My question: Is there an option to automatically SPLIT a page IN FOUR equal parts and put them automatically in the right order?
    And yes, I asked the person to give me the original files. But it is not possible.
    Thank you very much for your help.
    Paul
    I have Acrobat 9.

    This is the SOLUTION:
    http://www.pdfscissors.com/
    Sad to see that Acrobat hasn´t included such option...

  • How do I get tracks in the right order?

    I've syncd my albums onto my Nano, but on one of them (a musical) the tracks are in the wrong order. I don't want the finale in the middle, etc. I've numbered the tracks, and in Itunes they appear in the right order, but on the Ipod they're mixed up. What should I do to get them into the right order?

    Hello joy R,
    Barkingmad in Colorado here.
    1. plug in nano
    2. select the play list of the work you mentioned (if still in the music main list make a play list just for this work).
    3. in the pull down menu View select View options
    4. check mark the box Track number
    5. go back to the play list for the work and click on the heading called " Track # " and it should put the list in order. If it is reversed click on the heading again; note the little triangle changes direction. Some times this is a bit tricky to make work. For the sound track to The Thomas Crown Affair it would not keep the songs in order in my shuffle but seems to work right in nano.
    Good luck.

Maybe you are looking for

  • Kernel panic keeps happening even after I did the factory reset. any suggestions ?

    kernel panic keeps happening even after I did the factory reset. any suggestions ?

  • Windows Vista P300D 21K (NO RECOVERY DISKS AND NO OS)

    Hi, i have a Toshiba Satellite P300D-21K laptop, i have recovery disks for the OS but they dont work when copying the 2nd bit out of 5, ive had the disk resurfaced and clean it etc so it cant be that. I have no OS to make a new disk. What can i do? T

  • Case in-sensitive search or query

    Hi, I have made a form based on a table. It has one coulmn that has mix-case field(like filed is Title, and values of this field is 'Oracle Application Server 9i'.) If i type 'Oracle Application Server 9i'in the field and click query button (or searc

  • Problem with task to object status mapping

    Hi, There is a task 'Create User' on which on completion changes the object status to provisioned. There is a subsequent task named 'Update form' which on rejection should change the object status back to provisioning. I have implemented this logic i

  • MapViewer 10.1.3 / 11g and WebLogic

    Hi forum After Oracle's acquisition of BEA, I have read a lot of places that OC4J will be desupported soon and replaced with the WebLogic Java container. Among others, Steve Cosner from Oracle has declared the OC4J 11g preview to be dead and soon to