Announcement

Collapse
No announcement yet.

Anyone Know - SQL?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Anyone Know - SQL?

    hello, When I was running vb 2, I was able to display calendar events on a non vb page with this code"
    ---
    <?php

    $events = $DB_site->query("SELECT event, eventdate, eventid, subject

    FROM calendar_events

    WHERE public = 1 AND eventdate >= '".vbdate('Y-m-d',time())."'

    ORDER BY eventdate LIMIT 10");

    if ($DB_site->num_rows($events)) {

    while ($event = $DB_site->fetch_array($events)) {

    echo "<font face=\"Arial\" size=\"2\" color=\"#ffffff\"><a href='forum/calendar.php?s=$session[sessionhash]&action=getinfo&eventid=".$event['eventid']."'>".$event['subject']."</a></font><br>";

    }

    } else {

    echo "<font face=\"Arial\" size=\"2\" color=\"#ffffff\">No Events</font>";

    }

    ?>
    ----


    I have since upgraded to vb 3.. And now this does not work any longer.
    If you know how I can fix this, please let me know.

    Thanks!
    JackG

  • #2
    look at how vb3 now displays events in the code ^^

    Comment


    • #3
      What do you mean?



      Originally posted by Faranth
      look at how vb3 now displays events in the code ^^
      JackG

      Comment


      • #4
        look at index.php and at the code

        Comment


        • #5
          Thanks Faranth, I will take a look tongiht.

          Originally posted by Faranth
          look at index.php and at the code
          JackG

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          X