|
#1
|
|||
|
|||
|
xml + sql
Hi,
right at the beginning I want to excuse if this was discussed elsewhere in the forum. But since it's not impossible in the forum to search for words with three chars, XML and SQL is hard to find. So, sorry for possible double posting. I'm trying to create a XML-file from the following Infos:
Since the name of the category is in an other table I'm stuck how to get the name.... I took the Flash Gallery Addon and modified the xml generator. So here is my result PHP Code:
Since I'm kind of 'untrained' in building SQL statements I hope you could help me. Thank you and greetings from Berlin Frank
__________________
°bruehgruppe |
|
#2
|
||||
|
||||
|
Try this:
In the above code find: PHP Code:
PHP Code:
Find: PHP Code:
PHP Code:
__________________
Pixelpost Documentation | Visual Pixels | My Addons | Transition Bottlerocket Fund |
|
#3
|
|||
|
|||
|
Hi Dkozikowski,
thanks for you attempt to help me out of the dark ;-) Unfortunately it doesn't work. The modified file only fetches the first result out of the database and finishes the job.... and the category field stays blank. I guess (and this definitely a guess) the nesting of the two queries isn't right. Do you have any other ideas or probably someone else. Any try and error experiments are welcome. thanks frank
__________________
°bruehgruppe |
|
#4
|
||||
|
||||
|
Here is a quick solution without getting too crazy with MySQL joins:
http://pastie.textmate.org/private/j...oo2diqpsuzmj1w
__________________
Pixelpost Documentation | Visual Pixels | My Addons | Transition Bottlerocket Fund |
|
#5
|
|||
|
|||
|
Yeah Yeah Yeah ...... you saved me from building a dirty work-around ;-) The solution works smooth as silk. Thank you very much. Now I can concentrate on building the frontend for the xml....
greetings from a happy frank PS: Just one last question. Do you have a hint how to get the exif_infos ou tof the database in a well formed XML. The problem is the exif_infos contains double quotes, which I don't know how to handle in the xml. Output is something like this Code:
........ 43" category="Arabica" exif="a:54:{s:13:"VerboseOutput";s:1:"0";s:6:" .........
__________________
°bruehgruppe |
|
#6
|
||||
|
||||
|
Yes, the EXIF is stored in the database as a serialized array.
You must first unserialize it before you can work with it. Once unserialized, the EXIF info will be available for use within a standard array...
__________________
Pixelpost Documentation | Visual Pixels | My Addons | Transition Bottlerocket Fund |
|
#7
|
|||
|
|||
|
thanks again, i'll have a look at it
__________________
°bruehgruppe |
|
#8
|
|||
|
|||
|
The XML-file works like a charm, just the special characters are driving me nuts.
For example: I have an image-title called "Buschwindröschen" the character ö is stored correct in the database and also displayed correct in the html-template. (see here). BUT when the xml is written via PHP with the command PHP Code:
So how can I fetch or write the data correct, so the XML is well formed in UTF-8?? thanks frank
__________________
°bruehgruppe |
| Post Reply |
| Thread Tools | |
|
|