Autor Beitrag
JungerIslaender
ontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 427
Erhaltene Danke: 5

Win XP
Delphi 7; Delphi 2005
BeitragVerfasst: Mo 31.08.09 19:58 
habe die folgende radiogroup in php

ausblenden Quelltext
1:
2:
3:
 
echo '<form method="POST" action="home.php">';
echo '<input type="radio" value="'.$row["PREIS"].''.$row["NAME"].'" name="Essen"  <b>'.$row["NAME"].'</b> '. $row["PREIS"].'<br>' ;


funktioniert auch.

$bestellung = $_POST['Essen'];

ausblenden Quelltext
1:
2:
3:
4:
  
$aendern = "UPDATE konten Set
bestellung = '$bestellung' WHERE user = '$username'";
$update = mysql_query($aendern);


Liefert aber kein ergebnis.


Moderiert von user profile iconChristian S.: Topic aus Off Topic verschoben am Mo 31.08.2009 um 20:20
DeddyH
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 31.08.09 20:11 
Welches Ergebnis erwartest Du denn? Hast Du es mal mit einer Abfrage auf mysql_affected_rows versucht?
Christian V.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 311

Win Xp Prof
Turbo Delphi 2005
BeitragVerfasst: Mo 31.08.09 20:38 
Das wird auch kein Ergebnis liefern! (naja, es liefert schon Eins, aber vermutlich nicht was du willst...)
Schau mal beim "Return Values" auf php.net/mysql_query nach.

_________________
Hardware runs the world, software controls the hardware, code generates software - Have You already coded today?
JungerIslaender Threadstarter
ontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 427
Erhaltene Danke: 5

Win XP
Delphi 7; Delphi 2005
BeitragVerfasst: Mo 31.08.09 21:45 
ausblenden Quelltext
1:
2:
3:
  $aendern = "UPDATE konten Set
  bestellzeitpunkt = '$time' WHERE user = '$username'";
  $update = mysql_query($aendern);


Das hier hingegen funktioniert. Und ich weiß leider nicht was du meinst.
Christian V.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 311

Win Xp Prof
Turbo Delphi 2005
BeitragVerfasst: Mo 31.08.09 22:24 
Zitat:
liefert aber kein Ergebnis


Zitat:
Return Values

For SELECT, SHOW, DESCRIBE, EXPLAIN and other statements returning resultset, mysql_query() returns a resource on success, or FALSE on error.

For other type of SQL statements, INSERT, UPDATE, DELETE, DROP, etc, mysql_query() returns TRUE on success or FALSE on error.

The returned result resource should be passed to mysql_fetch_array(), and other functions for dealing with result tables, to access the returned data.

Use mysql_num_rows() to find out how many rows were returned for a SELECT statement or mysql_affected_rows() to find out how many rows were affected by a DELETE, INSERT, REPLACE, or UPDATE statement.

mysql_query() will also fail and return FALSE if the user does not have permission to access the table(s) referenced by the query.

^^

_________________
Hardware runs the world, software controls the hardware, code generates software - Have You already coded today?
Yogu
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2598
Erhaltene Danke: 156

Ubuntu 13.04, Win 7
C# (VS 2013)
BeitragVerfasst: Sa 05.09.09 22:51 
Hast du dir schonmal $bestellung per echo angesehen? Schau mal, ob da überhaupt der richtige Wert drinsteht.