Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-26-2007, 09:29 PM   PM User | #1
mull300
New Coder

 
Join Date: Nov 2005
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
mull300 is an unknown quantity at this point
Exclamation i dont get it

would any one have any idea why this query would return a row that does not meet at least two of the requirements

Code:
SELECT 
COUNT(*) AS cnt FROM 
info AS a 
INNER JOIN exp AS b 
ON a.user_id=b.userId 
WHERE 
a.address_type='BT' 
AND a.delete_me='N' 
AND 
(b.industry=29 AND b.industry_private='N') 
AND 
(b.title LIKE 'web%' AND b.title_private='N')
the two that are red are the ones that dont match at all. in fact the user its pulling doesnt even have a row in the exp table.

Last edited by guelphdad; 01-27-2007 at 03:27 AM.. Reason: added [code] and [/code] tags
mull300 is offline   Reply With Quote
Old 01-27-2007, 12:29 AM   PM User | #2
Fumigator
UE Antagonizer


 
Fumigator's Avatar
 
Join Date: Dec 2005
Location: Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
Posts: 7,686
Thanks: 42
Thanked 637 Times in 625 Posts
Fumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of light
You're selecting a count(*) so how do you know what IDs it's selecting?
__________________
Fumigator is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:14 PM.


Advertisement
Log in to turn off these ads.