Jump to content

Recommended Posts

hey guys i have 2 databases that are exacly the same.but one is cars the other is cars2 i need to echo all of the contents of both togetter.

 

inventory page.

 

so i tryed looking up left join

 

im struggeling with this ..

 

SELECT *  cars LEFT JOIN cars2

 

works but thable 1 cars only show the id's not the rest of the info and table 2 cars 2 show it all?

 

both have the same fields(copy paste)

Link to comment
https://forums.phpfreaks.com/topic/198929-left-join-error/
Share on other sites

JOIN's are used when you have data that has some defined relationship in more than one table (i.e. the R in RDBMS.)

 

To do what you are attempting, you would use a UNION, however, you generally won't ever have same-meaning data split up into multiple tables as that creates several data management and performance problems.

Link to comment
https://forums.phpfreaks.com/topic/198929-left-join-error/#findComment-1044179
Share on other sites

I've got the same question.

both have the same fields(copy paste)

 

The used SELECT statements have a different number of columns

 

Both those statements cannot be true at the same time.

 

You would need to show what your tables are, what your data is, and what the expected results are for anyone one to be able to help you at this point.

Link to comment
https://forums.phpfreaks.com/topic/198929-left-join-error/#findComment-1044187
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.