I want my script to bring up only the results for which the "drawing" field is not empty. I tried using IS NOT NULL but that didn't work... (It brought up all the results in the table)
Anyway... here's my script can someone show me what I'm doing wrong?
<?php
// Database Connection
include("dbinfo.inc.php");
$db = mysql_connect("$server", "$username", "$password");
mysql_select_db($database,$db) or die (mysql_error());
$sql = mysql_query("SELECT * FROM data1 WHERE drawing IS NOT NULL");
?>
<h1>Items with drawing...</h1>
<?
while($row = mysql_fetch_array($sql)){
$num=$row['itemnumber'];
$desc=$row['description'];
$draw=$row['drawing'];
$status=$row['stat'];
echo "<b>Item number:</b><font size=5 color=blue>$num</font><br>
<b>Description:</b>$desc<br>
<b>Drawing:</b>$draw<br>
<b>Email:</b>$status<br>
<hr size=3 color=red>";
}
?>