Hallo,
ich bin ein php anfänger und habe bei 2 php codes probleme und kann die fehler nicht finden hoffe ihr könnt mir helfen.
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\Datenbank\htdocs\warenkorb.php on line 8
	
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 ' )' at line 5
	
danke und gruß 
marion
					ich bin ein php anfänger und habe bei 2 php codes probleme und kann die fehler nicht finden hoffe ihr könnt mir helfen.
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\Datenbank\htdocs\warenkorb.php on line 8
PHP-Code:
	
	
 $sql="DELETE FROM
     warenkorb
     WHERE
     warenkorb.kundennummer=".$_SESSION['nummer']";"
     AND
     artikelid="$del";
   mysql_query($sql) or die (mysql_error()); 
PHP-Code:
	
	
<?php
   include("dbconnect.php");
    $sql = "insert into
            warenkorb
            (artikelid, kundennummer)
            VALUES 
            ($id, ".$_SESSION['nummer'].")";
    mysql_query ($sql) or die(mysql_error());
    $sql = "select 
    id,
    titel,
    preis
    from 
    buchliste
    where 
    id = $id";
    $result = mysql_query($sql) or die(mysql_error());
  $row = mysql_fetch_assoc($result);
  $sql = "UPDATE buchliste SET 
  bestand = ".($row['bestand']-1)." 
  where 
  id = $id";
  $result = mysql_query($sql) or die(mysql_error());
 ?>
marion
 
          

 
							
						
 
 
Kommentar