Mailinglisten-Archive |
> ich stehe gerade etwas auf der Leitung. Um meine Bookmarks
> endlich mal aufzuräumen, habe ich sie in die Datenbank
> übertragen:
>
> CREATE TABLE bookmarks_li_m_th (
> links int(8) NOT NULL default '0',
> themes int(8) NOT NULL default '0',
> )
>
> CREATE TABLE bookmarks_links (
> id int(8) NOT NULL auto_increment,
> ...
> )
>
> CREATE TABLE bookmarks_themes (
> id int(8) NOT NULL auto_increment,
> ...
> )
>
> Jetzt suche ich ein Select-Statement, um alle Einträge
> in bookmarks_links zu finden, für deren id _keine_
> Einträge in bookmarks_li_m_th.links existieren.
SELECT *
FROM `bookmarks_links`
LEFT JOIN `bookmarks_li_m_th`
ON `bookmarks_links`.`id` = `bookmarks_li_m_th`.`links`
HAVING ISNULL(`bookmarks_li_m_th`.`themes`)
--
Sebastian Mendel
www.sebastianmendel.de
www.tekkno4u.de
www.nofetish.com
--
Infos zur Mailingliste, zur Teilnahme und zum An- und Abmelden unter
-->> http://www.4t2.com/mysql
php::bar PHP Wiki - Listenarchive