drbigfresh Posted November 15, 2007 Share Posted November 15, 2007 I am doing a select like this: $sql="select keyword from d_list_keyword where listid=" . $_GET['id']; $result = $db->Execute($sql) or die($db->ErrorMsg()); Is there any built in way to have it return the list of keywords as an array (preferably separated by a comma?) so I don't have to loop through it and build it on my own? mysql_fetch_array seems close to what I want, but I can't seem to get it to work. Link to comment https://forums.phpfreaks.com/topic/77511-solved-can-mysql-return-an-array/ Share on other sites More sharing options...
Barand Posted November 15, 2007 Share Posted November 15, 2007 "SELECT GROUP_CONCAT(keyword SEPARATOR ',') as keywords FROM d_list_keyword WHERE listid=" . $_GET['id'] Link to comment https://forums.phpfreaks.com/topic/77511-solved-can-mysql-return-an-array/#findComment-392482 Share on other sites More sharing options...
drbigfresh Posted November 16, 2007 Author Share Posted November 16, 2007 perfect. thanks! Link to comment https://forums.phpfreaks.com/topic/77511-solved-can-mysql-return-an-array/#findComment-392541 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.