news <[EMAIL PROTECTED]> wrote on 05/27/2005 02:46:09 PM:

> Hi,
> Today I designed a fairly cute error404.php page, which I'd like to 
> reuse in future.
> Currently I rely on remembering that I created such a page for say 
> ACME Carpets.
> 
> Now and again my memory fails to remember which site I developed a 
> piece of HTML,PHP,Perl,Javascript
> for and I spend more time going thru CD backups etc than it would 
> take to start again. I've
> postulated using MySql as a store for such pages. but is a database 
> suitable for storing, searching
> for and retrieving such information.???
> 
> Your eminent opinions and experiences desired!!
> 
> 
> -- 
> zzapper
> vim -c ":%s%s*%Cyrnfr)fcbafbe[Oenz(Zbbyranne%|:%s)[[()])-)Ig|norm Vg?"
> http://www.rayninfo.co.uk/tips/ vim, zsh & success tips
> 
> 

It is possible to do just what you propose. You could even FT index your 
code so that you could find certain key phrases (assuming that the 
keyphrase you want is at least 4 (or 3) characters long and does not 
appear in over 50% of the documents. HOWEVER, it is more proper to store 
files in a file system and just store the files path information in a 
database (along with other information like who it was for, who wrote it, 
etc.)

Once you start doing that, though, you might as well take that last 
itty-bitty step and move into a full version-control system. There are 
several out there, many of them are free. Not only do they keep your code 
well organized (and protected, usually) but it allows you to do all sorts 
of interesting things (like reverting to previous versions). That way if 
you modified the same file 5 times for 5 different clients, you wouldn't 
have to have 5 copies floating around. Your VCS software would allow you 
to regress your current version to any prior version.

In my humble opinion, that's the appropriate class of tool for the task 
you mention. Some sample names of VCS software: BitKeeper, Visual Source 
Safe. 

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Reply via email to