Zdravim, mam na stranke tento kod:
Kód:
$sql_vymaz = MySQL_Query("DELETE FROM novinky_new WHERE id='".$_POST['id']."'");
if($sql_vymaz){echo '<p style="color: green;"><b>Príspevok '.$_POST['id'].' bol úspešne zmazaný z databázy.</b></p>';
} else {echo '<p style="color: red;"><b>Príspevok '.$_POST['id'].' sa nepodarilo vymaza z databázy!</b></p>';}
A po nom tieto:
Kód:
$datum_mysql = MySQL_Result(MySQL_Query("SELECT datum_prispevku FROM novinky_new WHERE id='".$_POST['id']."'"), 'datum_prispevku');
$nadpis_mysql = MySQL_Result(MySQL_Query("SELECT nadpis FROM novinky_new WHERE id='".$_POST['id']."'"), 'nadpis');
$email_mysql = MySQL_Result(MySQL_Query("SELECT uzivatelia.email FROM uzivatelia, novinky_new WHERE uzivatelia.nick = novinky_new.nick AND novinky_new.id='".$_POST['id']."'"), 'uzivatelia.email');
Vysledok je tento:
Kód:
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 21 in /domains1/ws512000/public/www_root/databaza/novinky/novinky.php on line 243
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 22 in /domains1/ws512000/public/www_root/databaza/novinky/novinky.php on line 245
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 23 in /domains1/ws512000/public/www_root/databaza/novinky/novinky.php on line 246
Ked vsak zakazem prvy prikaz, na vymazanie, vsetko ide v pohode, viete mi poradit preco?