Jump to content

join SELECT question?


coder9

Recommended Posts

For goodness sake......put this thread back in the php forum. :(

 

Why put it in the PHP forum when it's clearly a MySQL issue?

 

i want to select a table where is currently joined (has foreign key).

Can you give us the table structures, and tell us exactly what your trying to select? It sounds like you can do it with one query using a join.

Link to comment
Share on other sites

 

Why put it in the PHP forum when it's clearly a MySQL issue?

.

 

1. Because I'll lay odds that the query isa going to be written in PHP.....for use in a PHP application.

2. Because there is no one watching this forum most of the time, compared to many watch the PHP forum most of the time.

3. Because it's silly to split hairs.....it's not as if it's a JavaScript question!!

Link to comment
Share on other sites

1. The problem is strictly MySQL.  There is no actual PHP coding help needed

2. That's your real problem right there, not that it's in a different forum, but that it's in a lower volume forum

3. Now that's just being kind of hypocritical, don't you think?  I can just see someone in the JS forum bitching about his topic being moved, saying ..."it's not as if it's a MySQL question!!"

Link to comment
Share on other sites

Hypocritical? I don't see how. I was trying to illustrate that if the question was about JavaScript (for example), then moving the thread to the Javascript forum would be a good thing.

 

As for point 1, lets ask the poster whether he/she is going to use this query in a php script or not.

Link to comment
Share on other sites

As for point 1, lets ask the poster whether he/she is going to use this query in a php script or not.

 

There question is about the QUERY, which is 100% MySQL. If they were asking a question about how to use the query with PHP, then maybe the topic would have been fine in the PHP forum...but they aren't.

Link to comment
Share on other sites

ok guys

 

I have these existing tables

 

let say table a, table b and table c. (all connected, meaning they are joined using foreign key)

 

note: that these table structure is not my work. (this is the work of another programmer)

 

now i just want to select table a.

 

I'm currently selecting table a only.

 

but there is no result and no error.

 

i'm not sure if this is possible. since i haven't experienced this before.

 

any nice advice?

 

Thank you.

 

 

 

Link to comment
Share on other sites

So, errr....  Can you give us columns?  All of this vagueness annoys me.

 

So you want the data from a, but you want to join b and c with a before selecting the stuff?

 

 

So, basically you have something like:

 

table a:

col1 | col2

 

table b:

col1 | col2

 

table c:

col1 | col2

 

Let's say col1 is the ID (and foreign keys)...  You want to select everything from a based on col2 from b or c or something?

 

Maybe I need to reread everything, but at the moment, I have no idea what you're trying to do.

Link to comment
Share on other sites

no the table a b c are already connected (with foreign key).

 

i just want to select only table a. or get the data value from table a.

 

i tried it but i don't see any results and no error.

 

mmm. i wonder why...

 

 

 

 

Link to comment
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.