Ich weis nicht wo der Fehler ist..
die fehler meldung verstehe ich irgendwie nicht..: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\alpaka\verkauf\detail.php on line 132
Fehler: 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 ''16'' at line 1
die $alpakaNr hole ich über $_GET und diese ist 16 und auch in der datenbank als eintragsnummer vorhanden.
Hier ist ein teil des scriptes wo der fehler auftaucht
	
							
						
					die fehler meldung verstehe ich irgendwie nicht..: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\alpaka\verkauf\detail.php on line 132
Fehler: 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 ''16'' at line 1
die $alpakaNr hole ich über $_GET und diese ist 16 und auch in der datenbank als eintragsnummer vorhanden.
Hier ist ein teil des scriptes wo der fehler auftaucht
PHP Code:
	
	
 <?php  
              
                  include("../db/db.php");
        $connection = mysql_connect($dbhost,$dbuser,$dbpass) or die("Keine Verbindung möglich: " . mysql_error()."<br />");
               $dbDatabase = "andenalpakas";
        if (!$connection) {
             echo('Verbindung zum Server nicht möglich: ' . mysql_error());  
    
              }
              if (!mysql_select_db($dbDatabase, $connection)) {
            echo('Datenbank konnte nicht geöffnet werden: ' . mysql_error());
              }
            
              $sql = "SELECT * FROM tiere WHERE nr IS '".$alpakaNr."';";
              
              $query = mysql_query($sql, $connection); 
              
              $array = mysql_fetch_array($query, MYSQL_BOTH) or die("Fehler: " . mysql_error()."<br />");
              
              $id = $array["id"];            
        $name = $array["name"];
        $rasse = $array["rasse"];
        $alpaka_typ = $array["alpaka_typ"];
          
 Moderator
							
						
Comment