View Full Version : select non empty row?

05-10-2009, 07:41 PM
How do i go about selecting from mysql the newest entry in table but all fields must not be empty, or a single declared row must not be empty? :thumbsup:

$q= "select id from tab where thisrow (is not empty) order by name desc";

I dont want to display from mysql if its empty... :)

05-10-2009, 07:44 PM
$q = "SELECT `id` FROM `tab` WHERE `thisrow` IS NOT NULL order by name desc";

Not tested...