Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Dividing multiple news posts to be put into a database
Old 08-25-2008, 07:42 PM Dividing multiple news posts to be put into a database
Truly's Avatar
Ultra Talker

Posts: 322
Trades: 0
I am making a site where I want to let any user create a page that is going to work in part like a blog.

My original plan was to have a database and give each user their own row and then every news post they have will go in the column 'body' and just have it seperated by something like ;%(@*; and I could explode it into an array.

Few problems with that. One there is the chance that for some reason, eventually someone will find my divider string and then my script doesnt work anymore. More importantly I think this has to be incredibly inefficient.

Any ideas of how I can go about this in a more intelligent way?
__________________
DVD Movie Release Database:
Please login or register to view this content. Registration is FREE
Truly is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-25-2008, 07:59 PM Re: Dividing multiple news posts to be put into a database
Extreme Talker

Posts: 238
Location: United States
Trades: 0
Use one database table for users, and have a second database table for posts. The 'users' table would have fields like user_id, username, password, etc. The 'posts' table would have fields like post_id, user_id, and body. Each news post that a user posts should go into its own row in this 'posts' table.
__________________
The interlocking pieces of web development: usability, performance, accessibility, and standards.
frost is offline
Reply With Quote
View Public Profile
 
Old 08-25-2008, 10:33 PM Re: Dividing multiple news posts to be put into a database
Truly's Avatar
Ultra Talker

Posts: 322
Trades: 0
wow that is much smarter than what I was going to do. Thanks.
__________________
DVD Movie Release Database:
Please login or register to view this content. Registration is FREE
Truly is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Dividing multiple news posts to be put into a database
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.12479 seconds with 12 queries