<?
ob_start();
$kapcsolat = mysql_connect("localhost", "proba", "proba");
mysql_select_db("sportesemenyek", $kapcsolat);
$parancs = "UPDATE futamok SET futam='$futam', helyzin='$helyszin', hossz='$hossz', idopont='$idopont' WHERE futam_id='$id'";
if (mysql_query($parancs))
{
header("Location: futamok.php");
}
else
{
print "nem sikerült";
}
mysql_close($kapcsolat);
ob_end_flush();
?>
na kérem van egy ilyen scriptem, ami nem fut le. van-e ötletetek, hogy miért? a tábla így néz ki:
CREATE TABLE IF NOT EXISTS `futamok` (
`futam_id` int(11) NOT NULL auto_increment,
`futam` varchar(100) NOT NULL default '',
`helyszin` varchar(100) NOT NULL default '',
`palya_hossz` int(11) NOT NULL default '0',
`elso` varchar(100) NOT NULL default '',
`masodik` varchar(100) NOT NULL default '00:00:00',
`elso_ido` time NOT NULL default '00:00:00',
`masodik_ido` time NOT NULL default '00:00:00',
`idopont` varchar(100) NOT NULL default '0000-00-00',
PRIMARY KEY (`futam_id`)
) TYPE=MyISAM AUTO_INCREMENT=22 ;
ez meg a form ha esetleg kell:
- 887 megtekintés
Hozzászólások
na mindegy csak azt akartam megmutatni, hogy vannak olyan névvel ellátott mezők, szal nem értem mi lehet a baj...:S
-=-=-
In the world w/o fences who need Gates?
In the world there are 10 type of ppl, who know the binary, and who dont.
- A hozzászóláshoz be kell jelentkezni
Legközelebb tedd az ilyesmit pastebin-be. Jobban átlátható.
--
trey @ gépház
- A hozzászóláshoz be kell jelentkezni
oks, sry
-=-=-
In the world w/o fences who need Gates?
In the world there are 10 type of ppl, who know the binary, and who dont.
- A hozzászóláshoz be kell jelentkezni
helyzin=
- A hozzászóláshoz be kell jelentkezni
thx, de sajna még mindig nem jó :S
EDIT: ma már vagy 2000x átolvastam de nem láttam ezt :D
-=-=-
In the world w/o fences who need Gates?
In the world there are 10 type of ppl, who know the binary, and who dont.
- A hozzászóláshoz be kell jelentkezni
az nem lehet-e baj hogy ékezetes betűk a változók értékei...mert amúgy ilyeneket adok át hogy futam = Török Nagydíj, meg stb
-=-=-
In the world w/o fences who need Gates?
In the world there are 10 type of ppl, who know the binary, and who dont.
- A hozzászóláshoz be kell jelentkezni
sok baja van:
nem hasznalsz escape-lest
a register globals be van kapcsolva
"elfelejtetted" bemasolni a hibauzenetet..
- A hozzászóláshoz be kell jelentkezni
nem tom mi az az escape-les
hol tom ki kapcsolni?
nem vok nagy php programozó, csak kell csinálnunk egy adatbázisok kötprogit és lehetett választani hogy java/c++/php és úgy voltam hogy a php a legkönnyebb :)
OFF: hozzá tenném, hogy az iskolában nem tanítanak php-t, csak az sql parancsokat vettük át nagyvonalakban, de ez igaz java és cpp-re is, ok tanulunk mind a kettőt, de így konkrétan egy példát sem néztünk meg, hanem mindenki jöjjön rá otthon maágtól...kössz szte
-=-=-
In the world w/o fences who need Gates?
In the world there are 10 type of ppl, who know the binary, and who dont.
- A hozzászóláshoz be kell jelentkezni
print "nem sikerult";
helyett
print ' error number: '.mysql_errno().' -- error message: '.mysql_error().' -- query: '.$query;
igy mar lesz normalis hibauzid.
- A hozzászóláshoz be kell jelentkezni
na így már sikerült is rájönni a hibára :) thx
hiba: a táblában a mező neve nem hossz hanem palya_hossz :( :$
-=-=-
In the world w/o fences who need Gates?
In the world there are 10 type of ppl, who know the binary, and who dont.
- A hozzászóláshoz be kell jelentkezni
die($parancs);
t
- A hozzászóláshoz be kell jelentkezni
UPDATE futamok SET futam='Török Nagydíj', helyszin='paa', hossz='5338', idopont='2008-05-11' WHERE futam_id=5
-=-=-
In the world w/o fences who need Gates?
In the world there are 10 type of ppl, who know the binary, and who dont.
- A hozzászóláshoz be kell jelentkezni