Von MySql zu PostgreSQL

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
Kêitaro
Mitglied
Beiträge: 3
Registriert: 28.10.2005 22:04

Von MySql zu PostgreSQL

Beitrag von Kêitaro »

Hallo @All

Könnte mir vielleicht jmd. diese Sql Anweisung:

Code: Alles auswählen

$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id, t.topic_title, t.topic_last_post_id
			FROM ((( " . FORUMS_TABLE . " f 
			LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )
			LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id ) 
			LEFT JOIN " . TOPICS_TABLE . " t ON t.topic_last_post_id = p.post_id ) 
			ORDER BY f.cat_id, f.forum_order";
in PostgreSql ändern? Hier der falsche Ansatz:

Code: Alles auswählen

	$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id, t.topic_title, t.topic_last_post_id
				FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . TOPICS_TABLE . " t
				WHERE p.post_id = f.forum_last_post_id 
					AND u.user_id = p.poster_id  
					UNION (
						SELECT f.*, NULL, NULL, NULL, NULL
						FROM " . FORUMS_TABLE . " f
						WHERE NOT EXISTS (
							SELECT p.post_time
							FROM " . POSTS_TABLE . " p
							WHERE p.post_id = f.forum_last_post_id  
						)
					)
					ORDER BY cat_id, forum_order";
Grüße
Kêitaro
Mitglied
Beiträge: 3
Registriert: 28.10.2005 22:04

Beitrag von Kêitaro »

*push*

BÜDDDDDEEEEE.....
ExarKun2000
Mitglied
Beiträge: 11
Registriert: 17.04.2004 12:59
Wohnort: Wunsiedel
Kontaktdaten:

Beitrag von ExarKun2000 »

ähm, wieso lässt du sie nicht einfach? die anweisung ist sauber in postgres ausführbar...

cu tb

ps: www.pg-forum.de -> neu, deutsch (!) und ist über postgres...
hardware runs the world, software controls the hardware, code generates the software, have you coded today?
traumjob: dynamic durcheinander producer
Das deutschsprachige PostgreSQL Forum: http://www.pg-forum.de
Antworten

Zurück zu „phpBB 2.0: Mod Support“