Giter VIP home page Giter VIP logo

Comments (3)

wende60 avatar wende60 commented on June 27, 2024

hi Antje,

aus historischen Gründen stehen Anfangs und Enddatum eines Events nur als date-field, nicht aber als datetime-field in der db, auch wenn die einzelnen Termine durchaus mit der Zeit abgelegt sind. Dadurch fallen Termine zum aktuellen Datum schon bei der Datenbankanfrage raus.

Es gibt eine einfache Lösung, die ich auch implementieren werde: in der Beispieldatei myeventLatest musst Du auf Zeile 99 die Mysql-Query anpassen:

$sql->setQuery( "select * from `" . $tableDates . "` " .
        "a left join `" . $tableContent . "` b on a.id = b.event_id " .
        "where (a.enddate >= \"" . $myeventsStartDate . "\" and a.startdate <= \"" . $myeventsEndDate . "\") " .
        "and b.clang = " . $languageId . " order by a.startdate"); 

Geändert hat sich hier lediglich > zu >= und < zu <=, also grösser zu grösser oder gleich und kleiner zu kleiner oder gleich.

Alle Termine innerhalb des ausgewählten Zeitraumes durchlaufen noch eine PHP-Prüfung, hier wird dann auch die Uhrzeit berücksichtigt. Damit sollte das von Dir gewünschte Verhalten erreicht werden.

Gib Bescheid, ob das hilft...

Grüsse, Jo

from myevents.

Kucki2 avatar Kucki2 commented on June 27, 2024

Hi Jo,

sehr genial, genau, wie ich es mir vorgestellt habe :-) Tausend Dank...

Grüße, Antje.

from myevents.

wende60 avatar wende60 commented on June 27, 2024

Bitte gerne :)

from myevents.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.