so, I need a query that does this: get everything except null and empty values from a field and values which start certain way. Example of the values: everything NOT NULL and != '' and values which are like this 'test A 111', 'test B 222', 'test A 321'. I need the test A XXX, test B XXX values to get out from the query looking like this test A, test B (only one time). What I have so far:
$sql = "SELECT field";
$sql .= " FROM table";
$sql .= " WHERE field IS NOT NULL ";
$sql .= " AND field != '' ";
$sql .= " AND (src LIKE 'test A%' ";
$sql .= " OR src LIKE 'test B%') ";
But this will return only test A XXX and test B XXX values. I hope I explained it clear... Please help
