Serhioromano / bootstrap-calendar

Full view calendar with year, month, week and day views based on templates with Twitter Bootstrap.
http://bootstrap-calendar.eivissapp.com/
MIT License
3.02k stars 1.29k forks source link

trying to display events from two different tables in mysql how? #756

Open vincentdabs opened 6 years ago

R-Caser commented 6 years ago

$sqlEvents = "SELECT * FROM table1 WHERE xy ='yx'"; $resultset = mysqli_query($conn, $sqlEvents) or die("database error:".mysqli_error($conn)); $calendar = array();

while( $rows = mysqli_fetch_assoc($resultset) ) {
    // convert date to milliseconds
    $calendar[] = array(
    'id' =>$rows['id'],
    'title' =>$dt." ". $rows['title'],
    'url' => "#",
    "class" => 'event-important',
    'start' => $rows["start"],
    'end' => $rows["end"]
    );
}

$sqlEvents = "SELECT * FROM table2 WHERE xy ='yx'"; $resultset = mysqli_query($conn, $sqlEvents) or die("database error:".mysqli_error($conn)); $calendar = array();

while( $rows = mysqli_fetch_assoc($resultset) ) {
    // convert date to milliseconds
    $calendar[] = array(
    'id' =>$rows['id'],
    'title' =>$dt." ". $rows['title'],
    'url' => "#",
    "class" => 'event-important',
    'start' => $rows["start"],
    'end' => $rows["end"]
    );
}

$calendarData = array( "success" => 1, "result"=>$calendar);

vincentdabs commented 6 years ago

can i also ask why the calendar is not displaying in chrome and mozilla in other computers? but in my own its displaying?

cablegunmaster commented 6 years ago

Yes , because you don't host it online . Only on your own pc? (assumption) So do you got any server for your calendar?

My suggestion if you don't, buy some webstorage and webadress name and put all your files there.
Either that or you are hosting at your own pc but the pc is not able to be connected from outside. which are port issues (port forwarding required).