![]() |
I need some help with pulling data from a table
I am wanting to take data from my table associate and have it separated by a comma between each entry.
I have the following: PHP Code:
entry1,entry2,..... Thanks, Parker |
so let me guess this right, you have a colum which has the data as "john jane jack jude july" and you want it to read "john, jane, jack, jude, july"?
|
while ($rows=$DB_site->fetch_array($associategroups)) {
$ass_groupurl=$rows->associateurl; $ass_group=$rows->associate; eval('$associatenames .= "' . fetch_template('associate_names') . '";'); $col++; } eval('$associate .= "' . fetch_template('associate') . '";'); |
assuming he wasn't just needing to implode the array
PHP Code:
|
Pretty much the same :) I left out the comma because that could be added to the associate_names template
|
Quote:
|
Thanks for all the help. But (and yes I know its antique) I am still using vbulletin 2.36. fetch_template does not exist in 2.36. Any other suggestions?
This is what I have and it only displays PHP Code:
and then nothing after the comma. Thanks, Parker |
oooooooo v2.36 well.. I don't know 2.36 but try changing:
$ass_groupurl=$rows['associateurl']; $ass_group=$rows['associate']; to $ass_groupurl=$rows->associateurl; $ass_group=$rows->associate; |
Jolten:
That is what I used the first time and that didn't work either. In other words I have used $rows['associateurl'] and $rows->associateurl and neither one produces other than one result. |
Parker, just a tip, surround your code with [ php ] [ /php ] tags for clarity, makes it easier for people to read and thefore help :)
|
All times are GMT. The time now is 11:11 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|