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
TIP: Force wallpaper change
Posted by Red Squirrel
on Mar 12 2010, 10:44:25 am

Thunderbird 3.0 is a POS
Posted by Red Squirrel
on Feb 20 2010, 7:08:50 pm

I Need a new AV
Posted by Red Squirrel
on Feb 07 2010, 9:59:31 pm

10 minutes ago
Posted by Red Squirrel
on Jan 13 2010, 6:02:20 pm

Clean the inside of the PC software version
Posted by Triple6_wild
on Dec 13 2009, 11:28:33 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
10394 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? (570720 reads)
- Big Brother and Ndisuio.sys (139590 reads)
- PSP User's Guide (122495 reads)
- Text searching in linux with grep (99378 reads)
- SPFDisk (Special Fdisk) Partition Manager (93308 reads)
- Dynamic Forum Signatures (version 2) (3499 reads)
- Successfully Hacking your iPhone or iTouch (12409 reads)
- Ultima Online Newbie Guide (21410 reads)
- BBcode editor: PHP - The sensible approach (16122 reads)
- The Hitch Hikers guide to "the mouse" (13905 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