[PHP & MySQL] Update Fehler

cille

Erfahrenes Mitglied
Hi ho,
erhalte die Fehlermeldung mit "or die(mysql_error())":
Code:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '****', vorname='****', nachname='''''', firma='****', strasse='****' at line 1

Habe aber geschaut ob da ein fehler ist,
aber ich kann leider kein sehen,
vieleicht hab ick ja was übersehen?

Würd mich freuen wenn Ihr mal rüberschaut:
PHP:
$sql2 = "UPDATE users SET kdnr='".$kdnr.", username='".$username."', vorname='".$vorname."', nachname='".$nachname."', firma='".$firma."', strasse='".$strasse."', plz='".$plz."', ort='".$ort."', tel='".$tel."', fax='".$fax."', handy='".$handy."', email='".$email."', hp='".$hp."', rechte='".$rechte."' WHERE id='".mysql_real_escape_string($_POST["id"])."'";

SQL schaut so aus:
Code:
-- phpMyAdmin SQL Dump
-- version 2.8.1
-- http://www.phpmyadmin.net
-- 
-- Host: localhost
-- Erstellungszeit: 22. August 2006 um 14:50
-- Server Version: 5.0.21
-- PHP-Version: 5.1.4
-- 
-- Datenbank: `trummel`
-- 

-- --------------------------------------------------------

-- 
-- Tabellenstruktur für Tabelle `users`
-- 

CREATE TABLE `users` (
  `id` int(5) unsigned NOT NULL auto_increment,
  `kdnr` varchar(50) collate latin1_general_ci NOT NULL,
  `username` varchar(50) collate latin1_general_ci NOT NULL,
  `password` varchar(255) collate latin1_general_ci NOT NULL,
  `vorname` varchar(50) collate latin1_general_ci NOT NULL,
  `nachname` varchar(50) collate latin1_general_ci NOT NULL,
  `firma` varchar(85) collate latin1_general_ci NOT NULL,
  `strasse` varchar(85) collate latin1_general_ci NOT NULL,
  `plz` varchar(5) collate latin1_general_ci NOT NULL,
  `ort` varchar(50) collate latin1_general_ci NOT NULL,
  `tel` varchar(15) collate latin1_general_ci NOT NULL,
  `fax` varchar(15) collate latin1_general_ci NOT NULL,
  `handy` varchar(15) collate latin1_general_ci NOT NULL,
  `email` varchar(50) collate latin1_general_ci NOT NULL,
  `hp` varchar(50) collate latin1_general_ci NOT NULL,
  `rechte` varchar(1) collate latin1_general_ci NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=16 ;

mfg,
cille
 
Zurück