ThWboard Support-Forum (Archiv)

Ort: / Boardübersicht / PHP / MySQL Probleme / Search & Replace


Seite 1 von 1

Lars007 schrieb am 26.03.2004 um 20:32 Uhr

Folgende Struktur (MySQL):

[CODE]# Tabellenstruktur für Tabelle `gy_posts`
#
# Erzeugt am: 14. März 2004 um 15:47
# Aktualisiert am: 26. März 2004 um 20:26
#

CREATE TABLE `gy_posts` (
`post_id` int(10) NOT NULL auto_increment,
`topic_id` int(10) NOT NULL default '0',
`forum_id` int(10) NOT NULL default '0',
`poster_id` int(10) NOT NULL default '0',
`post_time` varchar(20) default NULL,
`poster_ip` varchar(16) default NULL,
PRIMARY KEY (`post_id`),
KEY `post_id` (`post_id`),
KEY `forum_id` (`forum_id`),
KEY `topic_id` (`topic_id`),
KEY `poster_id` (`poster_id`)
) TYPE=MyISAM AUTO_INCREMENT=214 ;

#
# Daten für Tabelle `gy_posts`
#

INSERT INTO `gy_posts` VALUES (1, 1, 3, 2, '2004-03-15 21:26', '62.158.31.0');
INSERT INTO `gy_posts` VALUES (2, 2, 4, 8, '2004-03-15 21:29', '80.228.132.0');
INSERT INTO `gy_posts` VALUES (3, 2, 4, 2, '2004-03-15 21:34', '62.158.31.0');
INSERT INTO `gy_posts` VALUES (4, 2, 4, 8, '2004-03-18 20:35', '80.228.133.0');
INSERT INTO `gy_posts` VALUES (5, 2, 4, 5, '2004-03-19 17:07', '217.88.149.0');[/CODE]

Ich möchte alle PosterIDs, die auf - sagen wir mal - 99 lauten, verändern, damit sie auf 1 lauten. Wie stell' ich das an?

Lars

P.S.: Nein, das ist kein ThWboard.

Narodnaja schrieb am 29.03.2004 um 21:09 Uhr

UPDATE gy_posts SET poster_id = '1' WHERE poster_id = '99'

Lars007 schrieb am 30.03.2004 um 12:48 Uhr

Thx vielmals.
Hat wunderbar geklappt, alle Postings gehören dem Gast.

Seite 1 von 1