mein prob ist es, wenn cih die werte auslesen will bekomme ich immer die fehlermeldung "Warning: Supplied argument is not a valid MySQL result resource". kann mir da jemand weiter helfen, hie der quelltext:
<form name="suche" method="post" action="<?echo$PHP_SELF?>">
Name
<input type="text" name="txt_name" size="15" maxlength="50"<?if(isset($txt_name)){echo" value='$txt_name'";}?>>
oder/und Vorname
<input type="text" name="txt_vorname" size="15" maxlength="50"<?if(isset($txt_vorname)){echo" value='$txt_vorname'";}?>>
oder/und Telefonnummer
<input type="text" name="txt_telnummer" size="15" maxlength="50"<?if(isset($txt_telnummer)){echo" value='$txt_telnummer'";}?>> ->
<input type="submit" name="Abschicken" value="Suchen">
</form>
<?
if(isset($txt_name) || isset($txt_vorname) || isset($txt_telnummer))
{
?>
<b>Folgendes wurde gefunden :</b><br><br>
<table border="0" cellspacing="0" cellpadding="3" align="left">
<tr>
<td><b>Name</b></td>
<td><b>Vorname</b></td>
<td><b>Firma</b></td>
<td><b>Strasse</b></td>
<td><b>Ort</b></td>
<td><b>PLZ</b></td>
<td><b>Vorwahl</b></td>
<td><b>Telefonnummer</b></td>
<td><b>Durchwahl</b></td>
</tr>
<?
if(($txt_name<>"") || ($txt_vorname<>"") || ($txt_telnummer<>"")){$where_string = " WHERE ";}
if($txt_name<>""){$where_string = $where_string."Nachname LIKE '%$txt_name%'";}
if(($txt_vorname<>"") && ($txt_name<>"")){$where_string = $where_string." && Vorname LIKE '%$txt_vorname%'";}else{if($txt_vorname<>""){$where_string = $where_string."Vorname LIKE '%$txt_vorname%'";}}
if((($txt_vorname<>"") || ($txt_name<>"")) && ($txt_telnummer<>"")){$where_string = $where_string." && Telefonnummer LIKE '%$txt_telnummer%'";}else{if($txt_telnummer<>""){$where_string = $where_string."Telefonnummer LIKE '%$txt_telnummer%'";}}
$get_data = "SELECT Nachname,Vorname,Durchwahl,Firma,Strasse,Ort,PLZ,Vorwahl,Telefon FROM aydin,kunde_adresse Where aydin.firmen_nr = kunde_adresse.nr".$where_string;
$erg_data = mysql_db_query($datenbank,$get_data,$verbindung);
while(list($Name,$Vorname,$Durchwahl,$Firma,$Strasse,$Ort,$PLZ,$Vorwahl,$Telefon) = mysql_fetch_row($erg_data)) //der fehler weist auf diese zeile
{
?>
<tr>
<td><?echo$Name;?></td>
<td><?echo$Vorname;?></td>
<td><?echo$Firma;?></td>
<td><?echo$Strasse;?></td>
<td><?echo$Ort;?></td>
<td><?echo$PLZ;?></td>
<td><?echo$Vorwahl;?></td>
<td><?echo$Telefon;?></td>
<td><?echo$Durchwahl;?></td>
</tr>
<form name="suche" method="post" action="<?echo$PHP_SELF?>">
Name
<input type="text" name="txt_name" size="15" maxlength="50"<?if(isset($txt_name)){echo" value='$txt_name'";}?>>
oder/und Vorname
<input type="text" name="txt_vorname" size="15" maxlength="50"<?if(isset($txt_vorname)){echo" value='$txt_vorname'";}?>>
oder/und Telefonnummer
<input type="text" name="txt_telnummer" size="15" maxlength="50"<?if(isset($txt_telnummer)){echo" value='$txt_telnummer'";}?>> ->
<input type="submit" name="Abschicken" value="Suchen">
</form>
<?
if(isset($txt_name) || isset($txt_vorname) || isset($txt_telnummer))
{
?>
<b>Folgendes wurde gefunden :</b><br><br>
<table border="0" cellspacing="0" cellpadding="3" align="left">
<tr>
<td><b>Name</b></td>
<td><b>Vorname</b></td>
<td><b>Firma</b></td>
<td><b>Strasse</b></td>
<td><b>Ort</b></td>
<td><b>PLZ</b></td>
<td><b>Vorwahl</b></td>
<td><b>Telefonnummer</b></td>
<td><b>Durchwahl</b></td>
</tr>
<?
if(($txt_name<>"") || ($txt_vorname<>"") || ($txt_telnummer<>"")){$where_string = " WHERE ";}
if($txt_name<>""){$where_string = $where_string."Nachname LIKE '%$txt_name%'";}
if(($txt_vorname<>"") && ($txt_name<>"")){$where_string = $where_string." && Vorname LIKE '%$txt_vorname%'";}else{if($txt_vorname<>""){$where_string = $where_string."Vorname LIKE '%$txt_vorname%'";}}
if((($txt_vorname<>"") || ($txt_name<>"")) && ($txt_telnummer<>"")){$where_string = $where_string." && Telefonnummer LIKE '%$txt_telnummer%'";}else{if($txt_telnummer<>""){$where_string = $where_string."Telefonnummer LIKE '%$txt_telnummer%'";}}
$get_data = "SELECT Nachname,Vorname,Durchwahl,Firma,Strasse,Ort,PLZ,Vorwahl,Telefon FROM aydin,kunde_adresse Where aydin.firmen_nr = kunde_adresse.nr".$where_string;
$erg_data = mysql_db_query($datenbank,$get_data,$verbindung);
while(list($Name,$Vorname,$Durchwahl,$Firma,$Strasse,$Ort,$PLZ,$Vorwahl,$Telefon) = mysql_fetch_row($erg_data)) //der fehler weist auf diese zeile
{
?>
<tr>
<td><?echo$Name;?></td>
<td><?echo$Vorname;?></td>
<td><?echo$Firma;?></td>
<td><?echo$Strasse;?></td>
<td><?echo$Ort;?></td>
<td><?echo$PLZ;?></td>
<td><?echo$Vorwahl;?></td>
<td><?echo$Telefon;?></td>
<td><?echo$Durchwahl;?></td>
</tr>
Kommentar