2
My problem is :
I have a field initial date and a field final date and on my table a field date. The user will enter a start date and a end date, and in the database I check if you have data included between these dates. If you have it is possible that there are several data between these dates. And my real problem is .. How to build HTML for the User?
Ex:
Data Inicial : 02/05/2008 Data Final : 05/07/2012
<tr>
<td>
<font size="-1">Data inicial :</font>
</td>
<td >
<input name="tx_data_inic" id="id_data_inic" type="text" maxlength="10" size="5">
</td>
<td >
<font size="-1">Data final :</font>
</td>
<td >
<input name="tx_dt_fina" id="id_data_final" type="text" maxlength="10" size="5">
<button type="button" onClick="f_veri_datas();"></button>
</td>
</tr>
Select checks for data in the table:
$w_querybusca="SELECT * FROM sai_cad_datas
INNER JOIN sai_cad_cara
ON sai_cad_cara.fk_seq_data = sai_cad_datas.seq_data
where sai_cad_datas.dt_nota between '$w_tx_dt_inic' and '$w_tx_dt_fina';";
Down there, assemble the data of the result in HTML. I do not know if the most correct way would be to use a radio button where a while goes mounting according to the number of data found.
1 - dados do resultado
2 - dados do resultado
3 - dados do resultado
Yes, it is possible.
– Oralista de Sistemas
Like then @Renan?
– Bruno
Filter the data exactly as you said, and display just them. You even say you already have the query ready. What you tried didn’t work out?
– Oralista de Sistemas
Yes I have the consultation ready picking up the fields. My problem is that I need to show the user the fields to select which one he wants to "edit"! And yes, I don’t know how to show them!
– Bruno
I suggest editing the question to focus on what you need. "How do I view data from a table..." or something like that. It seems to me that what you need is to take the result of the query and build the HTML, right? I would love to be able to help but PHP is not my strong suit :(
– Oralista de Sistemas
This @Renan, I need to get the result and assemble the HTML! It’s okay, I will make the appropriate edits for better understanding!
– Bruno
Old that’s still half incomplete... how would you like it to work? With ajax? You have there the return of the database, what would be the environment that shows the result? ?
– MarceloBoni
In short: translate your question into code form and description of your environment. . . . . . . . . . . . . . . . . See: http://answall.com/help/mcve
– brasofilo
I suppose it should be for a loop creating radio / button / ...!
– Bruno
Missing part that calls the desired HTML in your code (or if you want to use
<form>
, for example). And your query is where? Put the context in which it occurs, so the answers can be better elaborated.– Bacco