Jump to content

Recommended Posts

Hi,

 

i'm still trying to build a script that will display the upcomming events from a table (event) containing infos like title ($meuh2) and date infos ($newdate or $dateline for unix-timestamp)

 

here's a part of the code:

 

$query = "SELECT e.*, t.*, p.* FROM event AS e, thread AS t, post AS p  WHERE e.dateline_from > UNIX_TIMESTAMP() AND t.forumid = 16 AND t.threadid = p.threadid AND p.parentid = 0 AND t.title LIKE '$yo' AND t.forumid = '16' AND e.eventid = t.lv_vb_eventforums_eventid ORDER BY e.dateline_from DESC LIMIT $affichage";

 

$res = mysql_query($query) or die(mysql_error()); 

while($row = mysql_fetch_array($res)) {

$dateline = $row["dateline_from"];

$newdate = vbdate($vbulletin->options['dateformat'], $dateline, 0);

}

 

$blah2x = $row["title"];

$meuh2 = substr( $blah2x, 0, 200 );

 

 

echo "<table><tr><td>date: $newdate</td><td> event: $meuh2</td></tr></table>";

 

 

What I would like to do is the following:

at every MONDAY, write between two tables (between two events) something like "EVENTS FOR THIS WEEK: From sunday 3 to saturday 10"

and of course, write this only at the start of a week and not between each event. But, even if a whole month is empty and has no events, it should still display the message for each week

 

thanks for the help!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.