Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

212
Visualizações
JavaScript function to display records from SQL Server based on input date values

I am trying to create a rentals website. There is provision to input the start date and enddate and I have to fetch records from SQL Server matching the criteria. There is a table called Bookings which stores start date and end date of Apartment bookings. In order to display Apartment records with no corresponding booking in the given time range, how can I proceed with the JavaScript function?

I have something like this right now. The select query seems to be missing something.

function searchDB() {
    var start = document.getElementById("start").value;
    var end = document.getElementById("end").value;
    Select * from Apartments where Id NOT IN (SELECT ApartmentId from Bookings where start >= StartDate  and end <= EndDate);
  }
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You need have a REST API which will connect to the SQL SERVER database fetches the data, The REST API end point should be invoked from Frontend javascript code using AJAX or Fetch API.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda