Solved

Problem with inner join

Posted on 2015-02-02
2
109 Views
Last Modified: 2015-02-02
I have a query that reads:
$SqlString1 = "SELECT d.SEQ,d.BNMB,d.STRT,b.OWNCDE
                  FROM survey_data d
                  INNER JOIN bld2 b
                  ON d.SEQ = b.SEQ
                  WHERE d.SEQ = 'NY1035000575'";

It returns an error message that the "Query returned nothing".
If I delete the "b.OWNCDE" on the select, it works.

I know that there is an id in both "survey_data" and "bld2" that match.

What am I doing wrong?

Glenn
0
Comment
Question by:breeze351
2 Comments
 
LVL 32

Accepted Solution

by:
Daniel Wilson earned 500 total points
ID: 40584764
"Query returned nothing" is not a MySQL error.  I'm guessing that something else is reporting that and masking an actual MySQL error.

Are you quite sure OWNCDE is the correctly spelled name and it belongs to table bld2?
0
 

Author Closing Comment

by:breeze351
ID: 40584896
Thanks!!!
Can I kill my partner now.  The variable is a code for the owner.  He e-mailed me that it was "OWNCDE", which makes sense.  It's not!!!!  It's "OWCDE".

Thanks again
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

766 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question