ziegenmelker: mysql-Select fehlerhaft

Beitrag lesen

Moin moin!

Moin moin,

SELECT hostdb_host.hostname, hostdb_osversion.osversion, hostdb_ipaddress.ipaddress
FROM hostdb_osversion
INNER JOIN (

ich habe nichts darüber gefunden, daß MySQL verschachtelte joins unterstützt.

(
hostdb_host
INNER JOIN hostdb_interface ON hostdb_host.hostID = hostdb_interface.hostID
)
INNER JOIN hostdb_ipaddress ON hostdb_interface.interfaceID = hostdb_ipaddress.interfaceID
) ON hostdb_osversion.osversionID = hostdb_host.osversionID
WHERE (

Wofür sollen diese ganzen Klammern gut sein?

(
(
hostdb_ipaddress.ipaddress
) = - 1962070763
)
)
LIMIT 0 , 30

Sollte Dein Query nicht so viel einfacher funktionieren?

SELECT host.hostname, os.osversion, ip.ipaddress
FROM hostdb_host AS host, hostdb_osversion AS os, hostdb_ipaddress AS ip, hostdb_interface AS intf
WHERE host.hostID = intf.hostID
AND intf.interfaceID = ip.interfaceID
AND os.osversionID = host.osversionID
AND ip.ipaddress = - 1962070763
LIMIT 0 , 30

hth, ziegenmelker