Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8364451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:26:02+00:00 2026-06-09T12:26:02+00:00

This is continuing story from this PHP mysql LEFT JOIN output I have now

  • 0

This is continuing story from this PHP mysql LEFT JOIN output

I have now done modifications to second database (Cu.data) and database tables are like this:

mysql> desc ins.data;
+-------------------+------------------+------+-----+---------------------+----------------+
| Field             | Type             | Null | Key | Default             | Extra          |
+-------------------+------------------+------+-----+---------------------+----------------+
| ID                | int(10) unsigned | NO   | PRI | NULL                | auto_increment |
| Date              | timestamp        | NO   |     | 0000-00-00 00:00:00 |                |
| Number            | text             | NO   |     | NULL                |                |
| Text              | text             | NO   |     | NULL                |                |
| Email             | text             | NO   |     | NULL                |                |
| TargetID          | varchar(20)      | NO   |     | NULL                |                |
| CSW               | text             | NO   |     | NULL                |                |
| TSW               | text             | NO   |     | NULL                |                |
| Key               | text             | NO   |     | NULL                |                |
| CType             | text             | NO   |     | NULL                |                |
+-------------------+------------------+------+-----+---------------------+----------------+
10 rows in set (0.00 sec)

mysql> desc Cu.data;
+----------+---------------+------+-----+---------+-------+
| Field    | Type          | Null | Key | Default | Extra |
+----------+---------------+------+-----+---------+-------+
| Title    | decimal(15,0) | NO   |     | NULL    |       |
| Cu       | varchar(45)   | NO   |     | NULL    |       |
| Co       | varchar(25)   | NO   |     | NULL    |       |
| Ci       | varchar(25)   | NO   |     | NULL    |       |
| SID      | int(12)       | NO   |     | NULL    |       |
| TargetID | varchar(20)   | NO   | MUL | NULL    |       |
| SType    | varchar(12)   | NO   |     | NULL    |       |
+----------+---------------+------+-----+---------+-------+
7 rows in set (0.00 sec)

My query qoes like this:

mysql> SELECT ins.data.Date,  ins.data.Number,  
ins.data.Email, ins.data.TargetD, ins.data.CSW, 
ins.data.TSW, ins.data.CType, Cu.data.Cu, 
Cu.data.SID, Cu.data.Co,
Cu.data.Ci, Cu.data.SType 
FROM ins.data 
LEFT JOIN  
Cu.data ON (ins.data.TargetID = Cu.data.TargetID);

And output shows all needed values from ins.data (first database) BUT all values from Cu.data are ‘NULL’

TargetID is the ‘link’ between databases. ie. with TargetID I can map data between databases.

Data on ins.data is increasing slowly when peoples inserts data into it. Cu.data is static, it will be updated maybe once a year.

Since i never got PHP working i decided to utilize my bash programming skills. Via cron script sends email with fetched data from databases. Scripts works perfectly, but some data is missing.

And now the question; Why on earth my SQL-clause outputs data only from ins.data !?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T12:26:04+00:00Added an answer on June 9, 2026 at 12:26 pm

    When investigating join condition issues, the first place to look is whether the columns are compatible with each other (i.e. same type and storage size).

    For text columns there may also be issues with spaces and non-printable characters that may not be found easily.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Continuing my problem from yesterday, the Silverlight datagrid I have from this issue is
Continuing from this question : When I am trying to do fopen on Windows,
I have a list like this: ['Ww','Aa','Bb','Cc','ww','AA','BB','CC'] And continuing in such a pattern, with
I have a form that auto-completes from a database containing 2000+ and growing names.
I have this string containing a large chunk of html and am trying to
I have this problem containing some inequations and requirement to minimize a value. After
ok, so i have this slideshow.html containing just a bunch of pictures, and the
As a follow on from this question I'm building a custom server control to
I have been trying desperately to fix this issue where my ListView items are
I want to store a playlist of tracks from SoundCloud in a mySQL table.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.