Nieuw lid |
|
Ontani schreef: je kan het beste gebruiken: AND postcode in ('8900', '8700', '8504', '7545')
Ziet er inderdaad correct uit zo, toch krijg ik volgende melding:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/raamdecora/domains/raamdecoratie.be/public_html/uitlezen-gordijnstoffen-8900.php on line 27
<?php
error_reporting(E_ALL);
$con = mysql_connect("localhost","***","***");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("raamdecora_db1", $con);
$result = mysql_query("SELECT * FROM klanten WHERE groep_gordijnstoffen='1' AND postcode=('8900','8700')");
//$result = mysql_query("SELECT * FROM klanten WHERE groep_gordijnstoffen='1' AND postcode='8900'");
echo "<table border='1'>
<tr>
<th>ID</th>
<th>Firma</th>
<th>Straat</th>
<th>Postcode</th>
<th>Stad</th>
<th>Tel</th>
<th>Email</th>
<th>Website</th>
<th>Groep gordijnstoffen</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['firmaID'] . "</td>";
echo "<td>" . $row['firma'] . "</td>";
echo "<td>" . $row['straat'] . "</td>";
echo "<td>" . $row['postcode'] . "</td>";
echo "<td>" . $row['stad'] . "</td>";
echo "<td>" . $row['tel'] . "</td>";
echo "<td>" . $row['email'] . "</td>";
echo "<td>" . $row['website'] . "</td>";
echo "<td>" . $row['groep_gordijnstoffen'] . "</td>";
echo "</tr>";
}
echo "</table>";
?>
<?php if (!$con) { } $result = mysql_query("SELECT * FROM klanten WHERE groep_gordijnstoffen='1' AND postcode=('8900','8700')"); //$result = mysql_query("SELECT * FROM klanten WHERE groep_gordijnstoffen='1' AND postcode='8900'"); <tr> <th>ID</th> <th>Firma</th> <th>Straat</th> <th>Postcode</th> <th>Stad</th> <th>Tel</th> <th>Email</th> <th>Website</th> <th>Groep gordijnstoffen</th> </tr>"; { echo "<td>" . $row['firmaID'] . "</td>"; echo "<td>" . $row['firma'] . "</td>"; echo "<td>" . $row['straat'] . "</td>"; echo "<td>" . $row['postcode'] . "</td>"; echo "<td>" . $row['stad'] . "</td>"; echo "<td>" . $row['tel'] . "</td>"; echo "<td>" . $row['email'] . "</td>"; echo "<td>" . $row['website'] . "</td>"; echo "<td>" . $row['groep_gordijnstoffen'] . "</td>"; } ?>
|