Hi .
I am focusing a problem (with basic): mysql join tables. Since yesterday I reviewed a many posted answers regarding join tables, and mysql sources as well. Some how I did not found answer to my problem.
There are two tables, should “cooperate” together, but they don’t . LOL
Table one = Application:
apID ( INT)
apName (TEXT)
Table two=model:
mID (INT)
apID (INT)
the query : "SELECT * FROM model INNER JOIN application ON application.apID=model.apID
I expected to get: apID (numbers) - displayd in the “model” table but all what I got is only “0” . What am I doing wrong?
Thanks in advance
BASIC join tables
Moderator: General Moderators
Can you dump the array onto the screen and post the result?
did you double check case?
Code: Select all
<?php
print_r($array);
?>- CoderGoblin
- DevNet Resident
- Posts: 1425
- Joined: Tue Mar 16, 2004 10:03 am
- Location: Aachen, Germany
Normally for this kind of SELECT you would simply use the following:
.
although inner join should work. Is the data correct ?
Code: Select all
SELECT * FROM model,application WHERE application.apID=model.apIDalthough inner join should work. Is the data correct ?
I am still not done, but your suggestions give me a picture, what is wrong ( me LOL) .
GODER GOBIN said it should work - certainly it should work and as he/she suggests data …. codes ….. for sure . Query works, because I got an echo from both (joined) tables.
NEOPHYTE said : Can you dump the array onto the screen and post the result?
Not really LOL , but if I want my form works, I have to LOL.
This forum is an incredible sources of PHP and DB , and I am positive that soon I will find this what I need. At least… now, I know what I should looking for .
thank you for your time.
GODER GOBIN said it should work - certainly it should work and as he/she suggests data …. codes ….. for sure . Query works, because I got an echo from both (joined) tables.
NEOPHYTE said : Can you dump the array onto the screen and post the result?
Not really LOL , but if I want my form works, I have to LOL.
This forum is an incredible sources of PHP and DB , and I am positive that soon I will find this what I need. At least… now, I know what I should looking for .
thank you for your time.