Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 02-04-2004, 09:33 AM   #1 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
Photo Captions?

I want to add captions to a little photogallery script I have set up (example here: http://www.hungbrand.com/photos/asr_party/).

I was wondering if it was more effecient to put the captions into a plain text file and then parse them out of that (similiar to what Gallery does) or to store them in MySQL?

Does anyone have any experience with this? Any advise on doing it?

Thanks.
Admin.
__________________


Urban Clothing
Admin is offline   Reply With Quote
Old 02-04-2004, 11:45 AM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,503
sde is on a distinguished road
do 100 of them each way and setup micro time to see which is faster ?
__________________
Mike
sde is offline   Reply With Quote
Old 02-04-2004, 01:59 PM   #3 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
Argh, I was hoping for something more than that... freakin mike...

snowboarding Feb. 17th.
__________________


Urban Clothing
Admin is offline   Reply With Quote
Old 02-04-2004, 06:24 PM   #4 (permalink)
bdl
Senior Contributor
 
Join Date: May 2002
Location: vta.ca.usa
Posts: 555
bdl is on a distinguished road
Although I agree with Mike's comment about trying it both ways and testing to see which way is faster, I would think it would be faster to simply parse a text file; eliminates having to connect to the MySQL server, run the query, retrieve and sort out the results. Of course then again, what I don't know could fill the Astrodome...heh.
bdl is offline   Reply With Quote
Old 02-04-2004, 06:30 PM   #5 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,503
sde is on a distinguished road
what i know could fill 999,999 millionths of 99% of anything ... errrr something like that .. heh
__________________
Mike
sde is offline   Reply With Quote
Old 02-06-2004, 05:47 PM   #6 (permalink)
Epsilon
Regular Contributor
 
Epsilon's Avatar
 
Join Date: Mar 2003
Location: Las Vegas, NV
Posts: 127
Epsilon is on a distinguished road
With a function as small as this I doubt it would matter much if you use MySQL or a flat text file. As mentioned, you could measure the difference with microtime, but I can't imagine the difference would be noticable to any visitors.

If you already have a MySQL DB for some functions on this site, adding a new table to it is easy and probably worthwhile. If not, I would just use the text file. If you put all the captions on a new line you can easily load each one into an array using the handy file() function.
__________________
--Epsilon--
Epsilon is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Photo Album in PHPBB harjakob PHP 0 05-09-2003 02:17 AM


All times are GMT -8. The time now is 05:59 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting