Hallo,
ich habe ein problem und habe keine ahnung warum.
$suche = 'fox';
// Make a MySQL Connection
mysql_connect("host", "user", "pass") or die(mysql_error());
mysql_select_db("datenbank") or die(mysql_error());
$titel = mysql_query("select * from titel where `Name` LIKE '%".$suche."%' or `titel` LIKE '%".$suche."%';")
or die(mysql_error());
$i = 1;
while($row = mysql_fetch_array( $titel )) {
$titel = array( $i => array( 'ID' => $row['ID'], 'titel' => $row['titel'], 'Name' => $row['Name']));
$i++;
}
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in *** on line 9
zeile 9 ist
while($row = mysql_fetch_array( $titel )) {
und ich versteh nicht wo mein fehler ist.
die MySQL verbindung stimmt.
die MySQL abfrage stimmt.
also was habe ich falsch gemacht? :(