Page is a not externally linkable
- Code, Content, and Presentation
-- Databases
---- Selecting multiple rows from a single table


brotherhood_of_LAN - 1:44 am on Oct 28, 2012 (gmt 0)


$sql =
"SELECT fld_04_hrs, fld_08_hrs
FROM tbl_activities
WHERE fld_type = 'Kayak - Single' OR fld_type = 'Kayak - Double'";

Your initial query is saying match both (by using AND) which is why no rows are returned. Use OR instead.


Thread source:: http://www.webmasterworld.com/databases_sql_mysql/4513090.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com