This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Webmaster forum > January 2005 > PHP and... XML or MySQL?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author PHP and... XML or MySQL?
Steve Greenaway

2005-01-28, 7:44 pm

A lot of information seems to be out there regarding the use of PHP
and mysql together. I can't find many books about PHP and XML. Is
there a reason for this? Or is it just because PHP has only recently
supported XML in a thorough way?

I guess what I'm trying to ask is, what's a better method these days
for data management, assuming I'll be using PHP to create the web pages?

--
- Steve
"I think a good friend would recommend CLR to all his friends."
mbstevens

2005-01-28, 7:44 pm

Steve Greenaway wrote:

> A lot of information seems to be out there regarding the use of PHP
> and mysql together. I can't find many books about PHP and XML. Is
> there a reason for this? Or is it just because PHP has only recently
> supported XML in a thorough way?
>
> I guess what I'm trying to ask is, what's a better method these days
> for data management, assuming I'll be using PHP to create the web pages?
>


Data bases like mysql are great for storing and retrieving data quickly and
flexibly. XML is great for translation and interaction between data and
programs with disparate data formats -- and OK for storing data if you
don't mind the speed of serial access. It's easy enough to get data out of
a database into XML, and vice versa. The "better method" you're looking
for depends on what you're planning to do with the web pages.

You should also consider Perl/CGI as well as PHP.
--
mbstevens http://www.mbstevens.com/

Viper

2005-01-28, 7:44 pm

mbstevens wrote:
> Steve Greenaway wrote:
>
>
> Data bases like mysql are great for storing and retrieving data
> quickly and flexibly. XML is great for translation and interaction
> between data and programs with disparate data formats -- and OK for
> storing data if you don't mind the speed of serial access. It's easy
> enough to get data out of a database into XML, and vice versa. The
> "better method" you're looking for depends on what you're planning to
> do with the web pages.
>
> You should also consider Perl/CGI as well as PHP.


As long as the site doesnt depend on the info being saved. All my experience
with cgi is that it overloads the server and loses the files its writing to
at the time.


mbstevens

2005-01-28, 7:44 pm

Viper wrote:

>
> As long as the site doesnt depend on the info being saved. All my
> experience with cgi is that it overloads the server and loses the files
> its writing to at the time.


Nah. You're just holding your elbow at the wrong angle.


Steve Greenaway

2005-01-28, 7:44 pm

Following up to Viper's post since I don't seem to have mbstevens' here...

Kermit the Frog stuck a mic in Viper's face, who said:
>mbstevens wrote:

What do you mean by serial access? I guess I know even less about
databases than I thought I did.
[color=darkred]
>As long as the site doesnt depend on the info being saved. All my experience
>with cgi is that it overloads the server and loses the files its writing to
>at the time.


That's not so nice.

--
- Steve
"I think a good friend would recommend CLR to all his friends."
mbstevens

2005-01-28, 11:17 pm

Steve Greenaway wrote:

> What do you mean by serial access? I guess I know even less about
> databases than I thought I did.


A database knows where the information is stored, whereas you might have to
read through a big file to find something stored in an XML file. It's this
reading through that I meant by serial access, although you *actually* have
*random* access to any file on the server -- it's just no good to you if
you don't know the address you're looking for inside a file. A database
knows more about the physical location of the data stored inside, so it
can get to it much more quickly.

>
> That's not so nice.
>

He probably forgot to lock a file or something.
I've never run across this.


Dave Patton

2005-01-29, 4:20 am

Steve Greenaway <macfisto@engsoc.org> wrote in
news:cte8ip$8kj$1@driftwood.ccs.carleton.ca:

> A lot of information seems to be out there regarding the use of PHP
> and mysql together. I can't find many books about PHP and XML. Is
> there a reason for this? Or is it just because PHP has only recently
> supported XML in a thorough way?
>
> I guess what I'm trying to ask is, what's a better method these days
> for data management, assuming I'll be using PHP to create the web pages?


I'd say - apples and oranges.
If you have some data, and you want it to persist,
you have to store it somewhere/somehow. If that data
happens to be in XML format, then you could store it
in a database(e.g. MySQL), or maybe in files. Or you
could store the data in a database in appropriate
fields(e.g. text, numeric, etc), and have PHP serve
it as XML, HTML, plain text, PDF, etc.

--
Dave Patton
Canadian Coordinator, Degree Confluence Project
http://www.confluence.org/
My website: http://members.shaw.ca/davepatton/
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews