Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-02-2006, 05:25 PM
Red Blaze's Avatar
Red Blaze Red Blaze is offline
 
Join Date: Jan 2003
Location: Texas
Posts: 493
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Help with dates

I need a date. heh, just kidding, the title kinda called for it.

Anyway, I'm having a major issue here and my head is fried so that I can't think straight any more.

Here's my problem.

Attached to this post is an image of a table that has the holidays of the month. I can call them all out, but I can't emphasis the current holiday, and I want it to stay emphasised until the next holiday. These are some of the codes I used:

PHP Code:
$current_day = date("j");
$current_month = date("n");

$holiday = $row_current_holiday['ev_day'];
$name = $row_current_holiday['ev_name'];

if($current_day == $holiday){
echo "<b><i><u>$holiday - $name</u></i></b><br>";
}else{
echo "$holiday - $name<br>";
} 
And this is the mysql command calling all the holidays:

PHP Code:
mysql_select_db($database_ifroggie, $ifroggie);
$query_current_holiday = "SELECT * FROM event WHERE ev_month = $current_month";
$current_holiday = mysql_query($query_current_holiday, $ifroggie) or die(mysql_error());
$row_current_holiday = mysql_fetch_assoc($current_holiday);
$totalRows_current_holiday = mysql_num_rows($current_holiday); 
I tried alot of different methods, but I can't get it to work. Please, any help would be greatly appreciated.
Reply With Quote
  #2  
Old 01-02-2006, 06:12 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

try to echo the results and see what you have. I think you have to vbformat the vb dates.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 12:32 AM.


Powered by vBulletin® Version 3.9.0
Copyright ©2000 - 2017, vBulletin Solutions Inc.