![]() |
| Domain Name Sales | Domain Software | Calculate UK Domain Drop Dates | Domain Registration | NameDrive | Domain Parking | Subscribe to our Domains For Sale newsletter |
| | ||||||
| Home | Register | Rules | Membership Upgrade | Domains For Sale | Domain Name Escrow | Mark Forums Read | Domain Classified | Chat Room |
| Scripts and Coding PHP, MySQL, scripts |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
![]() | php help? (unique unserialize)
Need a bit of help with some php and a few kind members helped me in the past. My code is: PHP Code: I want to be able to search the whole table (where type='$type' - so many rows) for all names and then show unique names only. My code above unserializes the names from each field and then lists them, but doesn't deal with any duplicates (which I need removing). I have looked at functions like "unique_array()", and have tried using it in different places but it isn't doing the job. Any help appreciated.
__________________ Connect with me @ TW:LI:FB | MyWeb | D/L domains4sale | Morecambe London Student Forums Student Books UK promotions agencies |
| |
| | #2 (permalink) |
| Member | PHP Code: |
| |
| | #3 (permalink) |
![]() |
Many thanks for your reply jDubya. I just took someone's advice on another forum and the following code worked: PHP Code: Appreciate your help.
__________________ Connect with me @ TW:LI:FB | MyWeb | D/L domains4sale | Morecambe London Student Forums Student Books UK promotions agencies |
| |
| | #4 (permalink) |
| Member |
Your welcome - one thing to keep in mind though is that a solution like this doesn't scale well so on a larger data set performance would degrade massively... If working with larger data sets the DB should be doing the work instead of PHP. My problem when I first started learning PHP I wasn't properly shown Mysql - didn't learn for a long time things like EXPLAIN, INDEXES, DISTINCT(), DATE_SUB() etc instead of relying completely on PHP. Probably the single most useful period of learning I went through. Good luck! |
| |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Domain Name Community | Replies | Last Post |
| unique seo minisite offer /3 review copy going cheap | domain7172 | Mini Sites | 1 | 16-01-2010 05:07:32 AM |
| PHP include in a Smarty Template | admin | Scripts and Coding | 1 | 13-05-2008 06:37:26 AM |