» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > MySQL Forums

MySQL Forums Share Your Ideas and Tips about MYSQL. Ask questions about MYSQL. Table Design and Much More...

Reply
 
Thread Tools Display Modes
  #1  
Old 08-09-2006, 11:21 AM
fremson fremson is offline
Junior Member
 
Join Date: Aug 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
fremson is on a distinguished road
Default duplicates coming out

Hello

I have this query that get's the data I want, but it duplicates each row over 3000 times.

What I need is these results if it's BOUND and TELCOPEND or CUSTPEND thus the %PEND%.


PHP Code:
SELECT new_udb.lcompanyname, new_udb.username,
new_udb.lpackagecode, bindings.binding_state
FROM new_udb
INNER JOIN bindings ON new_udb.lrouterport=bindings.lrouterport
WHERE new_udb.lacctstatus LIKE '%PEND%' AND bindings.binding_state='BOUND';




This is a sample of what I get:

Quote:
[0] => Array
(
[lcompanyname] => Name1
[username] => username1
[lpackagecode] => 10-15-393
[binding_state] => BOUND
)
...
[3158] => Array
(
[lcompanyname] => Name1
[username] => username1
[lpackagecode] => 10-15-393
[binding_state] => BOUND< -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 08-09-2006, 11:23 AM
jackson jackson is offline
Junior Member
 
Join Date: Jul 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
jackson is on a distinguished road
Default

This code should assist you buddy

SELECT
new_udb.lcompanyname,
new_udb.username,
new_udb.lpackagecode,
bindings.binding_state
FROM new_udb
INNER JOIN bindings
ON new_udb.lrouterport=bindings.lrouterport
WHERE new_udb.lacctstatus
IN (BOUND,TELCOPEND,CUSTPEND)
AND bindings.binding_state='BOUND';

Take care -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
NEW Deals Coming UP. Dillan WebHosting Offers 0 02-18-2007 05:01 AM
Halloween coming Dana General Talk 1 10-20-2006 11:40 PM
Google coming with an O/S (Operating system)? milo Google 9 09-04-2006 05:42 AM
link nit coming up solomon Google 2 04-22-2006 02:31 PM
MSN Classifieds Coming greg MSN 4 12-14-2005 04:54 AM


All times are GMT. The time now is 04:56 AM.