I'm adding multiple list support for my users. So far I've:
Added a new service called "List"
Created a new table and associated fields
Added function to name a new list and add it to the db
I'd like some help on returning the values of the new db to populate a combo
box on a form I've built. Here is the (wrong) code I have so far in my
"list.php" file
/** * Returns the user custom list names */publicfunctionreturnList($listId,$sId=null){if($sId===null){$userservice=SemanticScuttle_Service_Factory::get('User');$sId=$userservice->getCurrentUserId();}$sql='SELECT * FROM '.$this->getTableName().' WHERE uId ='.' "'.$this->db->sql_escape($sId).'"';$result=mysql_query($sql);while($row=mysql_fetch_array($result)){$listName=$row["listName"];$options.="<OPTIONVALUE='$listName'>";}return$options;}
I want to call this function and return the results in a combo box on
editbookmark.tpl.php, how would I do that?
Thanks for the help!!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm adding multiple list support for my users. So far I've:
I'd like some help on returning the values of the new db to populate a combo
box on a form I've built. Here is the (wrong) code I have so far in my
"list.php" file
I want to call this function and return the results in a combo box on
editbookmark.tpl.php, how would I do that?
Thanks for the help!!!