Craig Hoffman wrote:
Hey Folks,
I have a query where it pulls random data and display's it.

SELECT route_photo, route, route_count, area FROM routes WHERE ???? ORDER BY RAND() LIMIT 1

The query works fine, however, the "route_photo" field is partially populated. This results in just a "route" name appearing but no photo. How can I change the query to only pull up "routes" that have a "route_photo" listed in the DB?

Thanks,
CH



Maybe you should add something like this in your WHERE clause : AND route_photo IS NOT NULL

--
Philippe Poelvoorde
COS Trading Ltd.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to