Misc Links
Forum Archive
News Archive
File DB
 

Ads
 

Advertisement
 

Latest Forum Topics
wow 56 k modems are
Posted by Red Squirrel
on Oct 14 2013, 11:52:23 pm

I Need A Program
Posted by rovingcowboy
on Sep 23 2013, 5:37:59 pm

having trouble witn lan
Posted by rovingcowboy
on Sep 23 2013, 5:40:56 pm

new problem for me
Posted by rovingcowboy
on Sep 23 2013, 5:54:09 pm

RBC Royal Bank
Posted by Red Squirrel
on Aug 13 2013, 6:48:08 pm

 

Beginner's PHP Tutorial - Data storage
Data Management with php
By Red Squirrel


This article is a continuation of my last php article, which turned out to be quite popular, but it only covers the basics. This article will continue on and go more into details along with base mysql information. It will cover data management with file databases and as well as mysql databases. Both are good methods of storing data, such as submitted forms, or even the posts, topics, settings etc of an entire message board!

This article script in particular uses both a mysql database and file database. The mysql part takes care of counting hits, pages, the title, categories and as well as the folder the article data is in, the file database part takes the files page1.htm page2.htm etc from the folder specified in the mysql database, and displays the html, which also points to the folder when there's pictures and such. This saves us from creating the site layout in every article. If you take the google ads to the left for example, it is not inserted into every article, just one php file that takes care of loading the database and article according to the parameters (what is after the .php? part in the url)

Depending on the application, file databases can be better then mysql, and in other applications, mysql can be better. In this article, when I refer to file database I simply mean an ordinary file on the server, or a group of files, that act to store data.

Mysql databases are better for when it comes to mass data management, such as a forum, because it is known to be faster and less of a load on the server. It can handle more. File databases, on the other hand, are for smaller applications where not lot of processing is involved, because it's much easier to program a script to use files, then it is to program a script to use mysql, to a certain degree. A script such as a counter, is better off with a file database. This entire site has a specialized logging system which is incorporated into most pages, and is run on a file database, you can't really tell much that it's there because it does not process much data, so a mysql database could actually end up being more of a load and more complex to program given the operations needed in this system. On the next page, we'll make a simple script that will act as a guest book system.





Next Page
spacer
18286 Hits Pages: [1] [2] [3] -1 Comments
spacer


Latest comments (newest first)
Be the first to post a comment!


Top Articles Latest Articles
- What are .bin files for? (28406 reads)
- Proper case cooling basics (22276 reads)
- Cyberstalking - What it is and what you can do as a victim. (20480 reads)
- Php how-to for starters (20056 reads)
- How to Use MDADM Linux Raid (19665 reads)
- How to Use MDADM Linux Raid (19665 reads)
- What is Cloud Computing? (18405 reads)
- Dynamic Forum Signatures (version 2) (18515 reads)
- Successfully Hacking your iPhone or iTouch (18773 reads)
- Ultima Online Newbie Guide (19343 reads)
corner image

This site best viewed in a W3C standard browser at 800*600 or higher
Site design by Red Squirrel | Contact
© Copyright 2014 Ryan Auclair/IceTeks, All rights reserved