GROUP_COMCAT Help
Posted: Thu Oct 11, 2007 10:17 am
feyd | Please use
it works and does everything i need it to do. it groups all the sites that i have by client. the problem is that i want to have the site name be a link to the site. here is the output now:
LRA
Arrow Buick Pontiac GMC
Bloomington Chrysler Jeep
SEV
Sever's Farm Market
Sever's Corn Maze
what is happening is that when i use the group_concat it makes the link look like this.
http://www.seversfarmmarket.com/http:// ... nmaze.com/
and both lines under the client are one link. here is how i am outputting it:[/syntax]
i would like to have each site name under the clients to be its own link. i kind of remember doing something like that before but i forgot how i did it.
if anyone has any input that would be great.
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
hello all
so i have this query.
[syntax="sql"]
SELECT webclient_client, GROUP_CONCAT(webclientsite_sitename SEPARATOR '<br>') as site_name, GROUP_CONCAT(webclientsite_location SEPARATOR '') as site_loc from webclient, webclientsite where webclient_id = webclientsite_webclient_id group by webclientsite_webclient_id order by webclient_client
LRA
Arrow Buick Pontiac GMC
Bloomington Chrysler Jeep
SEV
Sever's Farm Market
Sever's Corn Maze
what is happening is that when i use the group_concat it makes the link look like this.
http://www.seversfarmmarket.com/http:// ... nmaze.com/
and both lines under the client are one link. here is how i am outputting it:[/syntax]
Code: Select all
while ($rowwebclient = mysql_fetch_array($resultwebclient)){
$outputwebclient .="<div class='contentheadercontainer'>
<div class='contentheader'>
".$rowwebclient[webclient_client]."<br/>
<a href='".$rowwebclient[site_loc]."'>".$rowwebclient[site_name]."</a>
</div>
";
}if anyone has any input that would be great.
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]