This is a discussion on "[SOLVED] XML > MySQL?" within the PHP Forum section. This forum, and the thread "[SOLVED] XML > MySQL? are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] XML > MySQL?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
||||
|
[SOLVED] XML > MySQL?
I've learnt how to easily handle XML with PHP now.
So which would be faster, a blog driven by parsing XML or querying a database? I'm pretty sure it's the XML one right?
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
|
|
|||
|
Re: XML > MySQL?
That depends on how big you're expecting your blog to get. If you expect it to be huge, I'd go with the XML since it can store more data. However, MySQL is faster. Tough decision! Speed vs. size...
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Last edited by Stuart; Jan 5th, 2008 at 02:37. |
|
||||
|
Re: XML > MySQL?
I would say MySQL by far!
XML is working with files -- basically treated as text by PHP... MySQL is many times faster than PHP.. So adding the need for PHP to work with XML files would further slow things down.. I wouldn't depart from convention in this case because convention has it right -- use a database
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
|||
|
Re: XML > MySQL?
Yeah, good point. Since it's a blog, text is all he needs to store. But when you add more data, XML becomes slow. However, a MySQL database is hard to manage when you put a lot of data into it, unless you have really good shell software
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
||||
|
Re: XML > MySQL?
Cheers Luke
Two questions though. 1.) What are the best uses for XML storage? 2.) This is my XML:
I would expect this to list 1 to 200(abouts) seperated by <br>s but it just print: 1 Without the addChild() loop, it list 1-3. What am i doing wrong?
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
||||
|
Re: XML > MySQL?
Obviously but XML can handle larger data better than MySQL.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
|||
|
Re: XML > MySQL?
Yes, I know. That's why I originally suggested XML. Luke mentioned that MySQL is faster, and that is also true. So, it really depends...
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
||||
|
Re: XML > MySQL?
how many times did you just contradict yourself? o_0
"a string like this long do do do doododododododododoododododododododoodo times about 50 times would go into mysql and 500 times this length into XML" Agree?
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
|||
|
Re: XML > MySQL?
Yes, XML is better for storage, but MySQL is faster! Read my first post!
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
||||
|
Re: XML > MySQL?
Quote:
@Alex You need to rewrite your code a little
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
||||
|
Re: XML > MySQL?
Thanks Luke but that just outputs "4".
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
||||
|
Re: XML > MySQL?
It generates this XML:
This code generates the right XML but I still can't get it to loop through.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Last edited by alexgeek; Jan 5th, 2008 at 10:21. |
|
||||
|
Re: XML > MySQL?
Okay I didn't so that quite right I don't think..
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
||||
|
Re: XML > MySQL?
Thanks Luke, that was almost right just needed to alter the $numbers variable.
I think you were referencing to a lower level when you were actually on it. $xml when defined holds <numbers>, and I think you were trying to access numbers like: $xml->numbers - which doesn't exist. Anyway this code works perfectly. Thanks (thread solved)
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] do I need mysql set up on my computer? | Oak | Databases | 7 | Jan 18th, 2008 14:27 |
| [SOLVED] mysql question | longstand | Databases | 5 | Oct 23rd, 2007 04:11 |
| [SOLVED] Connecting/Using MySQL and ASP | Monie | Classic ASP | 8 | Oct 12th, 2007 09:00 |
| [SOLVED] MySQL to MSSQL | Anonymous User | Databases | 7 | Oct 6th, 2003 07:48 |