That would probably give you more control over the data.. however is not 
really an ideal solution. Also, if you want speed.. go with the file method.

That's how I'd do it, anyhow.

Mike

Qartis wrote:
> I'm running a logs system where log entries are .log files with filenames
> like 03012002.log for January 3rd, 2002. You can view when logs have been
> posted with a calendar, which will make the particular day a link if that
> day's log file exists. I'm thinking of storing the log entries in a mysql
> database, using code somewhat like the following:
> 
> $query = "select username, log, date_format(date, '%a %b %D') as date, from
> logs    where username = $username";
> $dates =  mysql_db_query($bb_news_db, $query) or die("Select Failed!");
> while ($row = mysql_fetch_array($dates)) {
> $date[row[$dates]]=1;
> }
> 
> So that each log entry would be put in the $date[] array, and then when the
> calendar script wanted to find out if there was an entry by that user on
> that particular day, it would just have to check the $date[] array.Will
> there be any speed difference between this and my current (file_exists();)
> method?
> 
> 
> 
> 
> 


-- 
Today when a man gets married he gets a home, a housekeeper, a cook, a 
cheering
squad and another paycheck.  When a woman marries, she gets a boarder.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to