Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

While schleife gibt kein wert zurück

Empfohlene Antworten

Veröffentlicht

Hi

ich habe ein Apache(PHP) und mySQL server auf einen Win2000Pro rechner laufen.

Ich habe ein problem mit einer abfrage von mySQL.

Er kann sich ohne probleme connecten aber ich bekomme einfach keine daten wenn ich die abfrage in einen while schleife setze. Was ist an dieser Syntax falsch???


$con=mysql_connect();
mysql_select_db(umsch);
$query="select * from main";
$result=mysql_query($query);
while($t = mysql_fetch_array($result));
{
print $t;
}
[/PHP]

wenn ich die Abfrage zählen lasse bekomme ich den richtigen wert zurück d.h. die Abfrage hat auch funktioniert.

Danke

Original geschrieben von SomethingRotten


while($t = mysql_fetch_array($result));
{
print $t;
}
[/PHP]

[/b]

da ist ein fehler :) versuchs mal hiermit:

[PHP]
while($t = mysql_fetch_array($result)) {
print $t;
}

Danke für die schnelle antwort

Das wars

mein fehler lag daran das ich ein ";" hinter die while geschrieben habe *grrrr*

danke

jap kommt vor... ich mach auch oft solche kleinen fehler wie anstatt == ein = oder mit " oder so... jaja das sind die bösen kleinen fehler ;)

viel spaß und gern geschehen! :)

[schleichwerbung-an]

underground-agency.de grüßt *hihi*

[/schleichwerbung-aus]

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.