Nieuw lid |
|
Hey iedereen,
Ik probeer 2 tabellen te joinen, maar zonder het "ON" attribuut. Ik wil dus gewoon de gegevens weergeven van beide tabellen. Ik heb deze query nu:
SELECT movies.Title, merchandise0.MerchID FROM movies INNER JOIN merchandise0
SELECT movies .Title , merchandise0 .MerchID FROM movies INNER JOIN merchandise0
Maar dat geeft deze data weer:
Array
(
[0] => Array
(
[Title] => Snow White and the Seven Dwarfs
[MerchID] => 1
)
[1] => Array
(
[Title] => Snow White and the Seven Dwarfs
[MerchID] => 2
)
[2] => Array
(
[Title] => Snow White and the Seven Dwarfs
[MerchID] => 3
)
[3] => Array
(
[Title] => Snow White and the Seven Dwarfs
[MerchID] => 4
)
[4] => Array
(
[Title] => Snow White and the Seven Dwarfs
[MerchID] => 5
)
)
( ( [Title] => Snow White and the Seven Dwarfs [MerchID] => 1 ) ( [Title] => Snow White and the Seven Dwarfs [MerchID] => 2 ) ( [Title] => Snow White and the Seven Dwarfs [MerchID] => 3 ) ( [Title] => Snow White and the Seven Dwarfs [MerchID] => 4 ) ( [Title] => Snow White and the Seven Dwarfs [MerchID] => 5 ) )
Normaal gezien zouden 4 van deze arrays geen "Title" inhoud mogen hebben en 1 geen "MerchID" inhoud, maar toch worden deze weergegeven? Ik maak de array trouwens zo:
<?php
$query_content = mysql_query("SELECT movies.Title, merchandise0.MerchID FROM movies INNER JOIN merchandise0");
$ContentData = array();
while ($ar = mysql_fetch_array($query_content, MYSQL_ASSOC))
{
$ContentData[] = $ar;
}
?>
<?php $query_content = mysql_query("SELECT movies.Title, merchandise0.MerchID FROM movies INNER JOIN merchandise0"); { $ContentData[] = $ar; } ?>
Heeft iemand een idee hoe ik dit goed kan krijgen? Alvast bedankt!
|