Search operator for field = undefined

0 views
Skip to first unread message

Robin H

unread,
Sep 26, 2007, 9:40:41 PM9/26/07
to phpMyAdmin
I feel dumb asking this but I really can't find the answer eleswhere.
Does anyone know how to construct a phpmyadmin search to return only
those records where a particular field is undefined? The field in
question is a varchar type. Thanks

David Hadley

unread,
Sep 27, 2007, 3:09:07 AM9/27/07
to phpMy...@googlegroups.com
Hi Robin,

Do you mean something like this (or am I being too simplistic?) The "IS
NOT NULL" part takes out any entries that are NULL for that field
(assuming NULLs are allowed -- but I don't want to get into a debate
about the similarities/differences between undefined and NULL!)

SELECT * FROM sometable WHERE fieldname <> "" AND fieldname IS NOT NULL;

Cheers,
Dave

Reply all
Reply to author
Forward
0 new messages