This query here is supposed to SELECT * pages where the $_GET[‘variables’] match the conditions. The $_GET['variables'] are $page_type = type of page AND $loc = location to search. The problem is that I have it set to LIMIT 20, but it only renders one page.
function SearchByTypeLoc($page_type, $loc) {
$query = mysql_query("
SELECT
`$page_type`.title AS title,
`$page_type`.url_title AS url_title,
`$page_type`.page_type AS page_type,
`$page_type`.street AS street,
`$page_type`.city AS city,
`$page_type`.state AS state,
`$page_type`.city_state_zip AS city_state_zip,
`$page_type`.phone AS phone,
LEFT(`$page_type`.body, 100) AS body,
LEFT(`$page_type`.type, 50) AS type,
GROUP_CONCAT( i.image_loc ) AS images
FROM `$page_type`
JOIN page_images i USING( title )
WHERE
`$page_type`.page_type = '$page_type' AND
`$page_type`.city = '$loc'
ORDER BY title
LIMIT 20");
while($fetch = mysql_fetch_assoc($query)) { ...
?>
Any idea how to make it not LIMIT 1?
GROUP_CONCAT is an aggregate function,
try explicitly add a