Board index   FAQ   Search  
Register  Login
Board index PHP PHP General

storing messages

General discussions related to php

Moderators: macek, egami, gesf

storing messages

Postby xyoon » Wed Jul 09, 2003 6:18 pm

Hi,

I am planning to build a simple forum with php.
Initially, I think of storing all the messages by writing it to a file on a server (the files would be XML files).

Recently, I encountered some websites that store messages in the database.

Now, I am confused on which method to use.
Could anyone suggest to me which is more efficient or giving a better results overall.

Thank you very much in advance.



regards
xyoon
New php-forum User
New php-forum User
 
Posts: 40
Joined: Fri Jun 27, 2003 10:57 pm

Postby liquedus » Wed Jul 09, 2003 6:25 pm

if you are starting out with php go with MySQL, since this combo is extremely easy to get used to.

Be ready to pick up a paper and pencil too cause a lot more thought will have to go into a project like this than you think.

just giving you a heads up :wink:
liquedus
php-forum Active User
php-forum Active User
 
Posts: 266
Joined: Tue Apr 08, 2003 5:18 am
Location: Ottawa, Canada

Postby xyoon » Wed Jul 09, 2003 8:24 pm

Hi,

Thanks for your reply.
So, you're suggesting me to store all the messages in the database instead of writing all the messages to a file(xml)?

But, would that be efficient?
Everytime, a new message posted we have to add it to the database.
I believe writing to a database will take longer time than writing to a file (please correct me if this is wrong).

I would love to hear your opinions as well as others'.
Thank you.


regards
xyoon
New php-forum User
New php-forum User
 
Posts: 40
Joined: Fri Jun 27, 2003 10:57 pm

Postby WiZARD » Thu Jul 10, 2003 5:09 am

http://www.php-tools.de very powerfull engine work with XLM and Template......
recommend
User avatar
WiZARD
Moderator
Moderator
 
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol

Postby pootergeist » Thu Jul 10, 2003 5:26 am

xyoon wrote:But, would that be efficient?
Everytime, a new message posted we have to add it to the database.
I believe writing to a database will take longer time than writing to a file (please correct me if this is wrong).


Both avenues have their pros and cons.

Database - (namely mysql)
can access data superbly fast and can manipulate the data easily (eg deleting, editing, searching). slightly slower adding data as noted.

Flatfile - unfunctional though quite nippy - would need to write your own functions for deleting/editing/searching though.

personally I'd advise database for the ease of adding extra facilities (the editing/searching/deleting bits) and because they are more useful to learn.
pootergeist
New php-forum User
New php-forum User
 
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK

Postby xyoon » Thu Jul 10, 2003 3:36 pm

Hi everyone,

Thanks for both of your reply.
Now, I have a sense of direction in constructing it.

:D


regards
xyoon
New php-forum User
New php-forum User
 
Posts: 40
Joined: Fri Jun 27, 2003 10:57 pm


Return to PHP General

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.