/ MySQL - not a valid MySQL result
Picco
- php
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? :(
Hi, du greifst anders auf den array zu.
while ($row = mysql_fetch_array($titel)){
$id = $row['ID'];
}
Grüße
»» $titel = mysql_query("")
> while($row = mysql_fetch_array( $titel )) {
> $titel = array();
> }
ich habe $titel 2x vergeben das geht natürlich nicht oh man 15Uhr und ich bin immer noch nicht ganz wach