![]() |
PHP Question
I have the following function
PHP Code:
This prints each category everytime its listed in the db I cant use select distinct because some categories contain more than one category : example anal, amateur, blowjob |
This should work for ya:
Quote:
|
That's what I get for posting this early in the morning, I didn't read it ;)
You need to separate that out so its not in the same field like that. You could also read through all of them explode them by the commas and unique that array. |
well your problem is bad database design ;) basically what ferrishyn said....his solution will work too....but it's better to start at the source and build up your database the right way
|
Yea the database design is from an affiliate dump, they dump the categories seperated by commas.
|
yo, a quick hack to get your stuff working...
note: that select statement gives the impression that the categories are already stored in the database as one category per row, but i guess not. PHP Code:
|
update:
replace ($category) in the echo statement to ($element) which holds the category. peace |
All times are GMT -7. The time now is 02:17 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123