Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I solved my problem...There is the code if anyone wants to use. I used the Keith-Wood countdown and my countdown works fine but now I want another question. When the countdown finish, i want to update into my database.</p> <p>How I discover when the countdown finish and next update into my database?</p> <p>$query3 = "select v.id,v.titulo,v.descricao,v.precoOriginal,v.desconto,v.dataFinal,v.estado, c.nome,i.nome,i.tipo from voucher as v LEFT JOIN categoria as c on v.id_categoria = c.id LEFT JOIN imagem as i on i.id_Voucher = v.id WHERE c.nome = ? ORDER BY v.id DESC"; $stmt3 = $mybd->prepare($query3); $stmt3->bind_param("s",$cat);<br> $stmt3->execute(); $stmt3->bind_result($idVoucher,$titulo,$descricao, $precoOriginal, $desconto,$data,$estado, $nome, $nomeImagem,$tipo);</p> <pre><code> while($stmt3-&gt;fetch()){ if($nome == $cat){ if($idVoucher == $idVoucher2 &amp;&amp; $estado == "ativo" &amp;&amp; $tipo == "paginaPrincipal"){ ?&gt; &lt;h2&gt;&lt;a href='./verOfertaCompra.php' &gt;&lt;?php echo $titulo ?&gt;&lt;/a&gt;&lt;/h2&gt; &lt;img class='imagem' src='./images/paginaPrincipal/&lt;?php echo $nomeImagem; ?&gt;' /&gt; &lt;div class='info'&gt; &lt;div class='primeiro'&gt; &lt;input class='data&lt;?php echo $idVoucher ?&gt;' type='hidden' value=&lt;?php echo $data; ?&gt; /&gt;&lt;br/&gt; &lt;span style="font-size: 15px; font-weight: bold; margin-left:38px;"&gt;Este Voucher termina em &lt;/span&gt;&lt;br/&gt;&lt;br/&gt; &lt;div id="defaultCountdown" class="endtime&lt;?php echo $idVoucher ?&gt;"&gt;&lt;/div&gt; &lt;script type="text/javascript"&gt; $(function () { var i = &lt;?php echo $idVoucher ?&gt;; var dataVal = $(".data" + i.toString()).val(); var data = new Date(dataVal); str = ".endtime"+i.toString(); $(str).countdown({until: data, format: 'dHMS'}); }); &lt;/script&gt; &lt;?php </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload