MySQL inner join, ben ik nou gek?

Pagina: 1
Acties:

Onderwerpen


Acties:
  • 0 Henk 'm!

  • creator1988
  • Registratie: Januari 2007
  • Laatst online: 07:58
Ik doe nooit iets met MySQL, maar ik probeer nu een simpele inner join te maken via deze query:

MySQL:
1
2
select p.*, t.oid as uid from billing.trans_paypal p
INNER JOIN billing.transactions t on p.paypal_id = t.provider_id;


Geeft een soort van cross join terug:

p.paypal_id | p.tra | uid
1 | NULL | 3
1 | NULL | 4
1 | NULL | 5

Ben ik nou gek? Een LEFT JOIN doet ook hetzelfde. Engine is InnoDB.

Acties:
  • 0 Henk 'm!

  • LauPro
  • Registratie: Augustus 2001
  • Laatst online: 19-09 16:51

LauPro

Prof Mierenneuke®

Wat wil je doen? Schema's?

Inkoopacties - HENK terug! - Megabit
It is a war here, so be a general!


Acties:
  • 0 Henk 'm!

  • creator1988
  • Registratie: Januari 2007
  • Laatst online: 07:58
Okee, laat maar. Iemand heeft even 5000 rijen met `provider_id` = 1 ingevoerd in de transactions tabel.

Acties:
  • 0 Henk 'm!

  • LauPro
  • Registratie: Augustus 2001
  • Laatst online: 19-09 16:51

LauPro

Prof Mierenneuke®

Je bent gek dus ;) .

Inkoopacties - HENK terug! - Megabit
It is a war here, so be a general!