Using Dreamweaver CS5 / MySQL
I'm trying to set up a query that will display rows of data but only if a specific column has data in it. If the Charname column is blank I don't want that row to be displayed.
Currently the query works, but it also displays the rows when the Charname column is empty. I'm struggling to set up and have failed at every turn to do it. Thanks in advance.
mysql_select_db($database_login_form, $login_form);
$query_Recordset1 = "SELECT * FROM users";
$Recordset1 = mysql_query($query_Recordset1, $login_form) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
<?php do { ?>
<li><a href="profile.php?id=<?php echo $row_Recordset1['id']; ?>"><?php echo $row_Recordset1['Charname']; ?></a></li>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>