bradgrafelman
I tried your solution
DELETE FROM `Comment` WHERE LENGTH(`Testimonial`) = 0;
and it worked on the DB.
But I put that in my php webpage and it doesnt work.
Basicly what Im trying to do with this page is pull the rows where Testimonial has info and display it. If Testimonial' is blank or null then it doesnt display any thing. can someone see where im messed up at?
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$sql = 'DELETE FROM `Comment` WHERE LENGTH(`Testimonial`) = 0';
$sql = 'SELECT Testimonial , First_Name , Last_Name , Company , City , State , Date FROM Comment ORDER BY Date DESC LIMIT 0, 30 ';
$result=mysql_query($sql);
while($data = mysql_fetch_assoc($result)) {
echo "<b>{$data['Testimonial']}<br>{$data['First_Name']} {$data['Last_Name']} {$data['Company']} {$data['City']} {$data['State']}<br><hr>";
}
mysql_close();
?>