Misc Links
Forum Archive
News Archive
File DB
 

Ads
 

Advertisement
Age of Valor - Ultima Online Free Shard
AoS/SE/ML/Custom - advanced code, dedicated staff, peerless bosses, non overpowered customs + much much more
 

Latest Forum Topics
Vmware Shifts Pricing Strategy
Posted by Red Squirrel
on Sep 02 2010, 7:09:04 pm

Badass Chipmunk
Posted by Triple6_wild
on Sep 01 2010, 1:06:15 am

Evony Farming And Building Helper Tool
Posted by Red Squirrel
on Sep 01 2010, 4:40:12 pm

I Just Thought Of A Cool Invention
Posted by rovingcowboy
on Aug 31 2010, 12:21:50 am

Shocks Dangerous?
Posted by Triple6_wild
on Aug 30 2010, 10:26:12 pm

 



Send spam to: website@xeonlive.com nick@xeonlive.com georgiapeach1241@aol.com
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
10765 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? (592340 reads)
- Big Brother and Ndisuio.sys (143051 reads)
- PSP User's Guide (127665 reads)
- Text searching in linux with grep (115015 reads)
- SPFDisk (Special Fdisk) Partition Manager (101076 reads)
- Dynamic Forum Signatures (version 2) (4640 reads)
- Successfully Hacking your iPhone or iTouch (14321 reads)
- Ultima Online Newbie Guide (25017 reads)
- BBcode editor: PHP - The sensible approach (17876 reads)
- The Hitch Hikers guide to "the mouse" (15273 reads)
corner image

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