Boas,
Estou com erro numa query onde tem que mostrar que os dados estão todos preenchidos.
Warning: mysql_query() expects parameter 1 to be string ,
Código (PHP):
Estou com erro numa query onde tem que mostrar que os dados estão todos preenchidos.
Warning: mysql_query() expects parameter 1 to be string ,
Código (PHP):
<?php
include("conectar.php");
$sql = mysql_query("Select *, count (*) From tb_trabalhador where AlvaraNumero is Not Null and AlvaraValidade is Not Null and AlvaraAnexo is Not Null and AcidenteNumero is Not Null and AcidenteValidade is Not Null and AcidenteAnexo is Not Null and SeguroNumero is Not Null and SeguroValidade is Not Null and SeguroAnexo is Not Null and InstaladorNumero is Not Null and InstaladorValidade is Not Null and InstaladorAnexo is Not Null and MontadorNumero is Not Null and MontadorValidade is Not Null and MontadorAnexo is Not Null");
$exibe = mysql_query($sql);
echo "<table>";
echo "<tr><td>Nome:</td>";
echo "<td>".$exibe["Nome"]."</td></tr>";
echo "<tr><td>Morada:</td>";
echo "<td>".(!empty($exibe["Morada"]) ? $exibe["Morada"] : "(N/A)")."</td></tr>";
....
include("conectar.php");
$sql = mysql_query("Select *, count (*) From tb_trabalhador where AlvaraNumero is Not Null and AlvaraValidade is Not Null and AlvaraAnexo is Not Null and AcidenteNumero is Not Null and AcidenteValidade is Not Null and AcidenteAnexo is Not Null and SeguroNumero is Not Null and SeguroValidade is Not Null and SeguroAnexo is Not Null and InstaladorNumero is Not Null and InstaladorValidade is Not Null and InstaladorAnexo is Not Null and MontadorNumero is Not Null and MontadorValidade is Not Null and MontadorAnexo is Not Null");
$exibe = mysql_query($sql);
echo "<table>";
echo "<tr><td>Nome:</td>";
echo "<td>".$exibe["Nome"]."</td></tr>";
echo "<tr><td>Morada:</td>";
echo "<td>".(!empty($exibe["Morada"]) ? $exibe["Morada"] : "(N/A)")."</td></tr>";
....