Jump to content
Fórum Script Brasil
  • 0

Select entre datas e combobox opcional


Question

Bom dia,

Gostaria de fazer um select entre datas e um combobox mas que se o campo combobox não fosse preenchido o resultado fosse apenas do intervalo de datas, mas no caso agora está com os 3 campos obrigatorios.

 

 $procura = mysqli_query($con,"SELECT count(*) AS caminhoes, data as data,obra_cliente,faixa,placa,quantidade,vrunit,vrtotal,horae,horas,ticket 
    FROM dosagem_usina 
    where data between '" .$dtinicio. "' AND '" .$dtfim. "' AND operacao = 'saida' and obra_cliente = '" .$obra. "' group by id order by id desc") 

 

Obrigado

Link to post
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

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

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  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.



  • Forum Statistics

    • Total Topics
      148692
    • Total Posts
      644525
×
×
  • Create New...