drellout Posted December 25, 2009 Report Share Posted December 25, 2009 Labs vakars... Es gribētu jums paprasīt, vai drizāk palūgt lai kāds varētu pateikt kā var izdzēst kko no sql neieejot viņa ar kādu kodu Man bija doma izveidot kaut ko tādu <strong>Ko dzēst ?</strong><br> <select name="clanwars" size="1" > <option value="1aiscw">1tm vs 2tm</option> <option value="2aiscw">1tm vs 2tm</option> ..... un tadaa garaa lai pats liek cik ir </select> </form> Lai viņš velk ārā cik ir tie piemēram clanwari un izvēloties viņu un tad uzspiežot pogu dzēst viņš izdzēšās Pašam ir tāds sql fails CREATE TABLE `cw` ( `km2` text NOT NULL, `km1_rez` text NOT NULL, `km2_rez` text NOT NULL, `km2_taut` text NOT NULL, `karte` text NOT NULL, `cikxcik` text NOT NULL, `id` int(10) NOT NULL auto_increment, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 Quote Link to comment Share on other sites More sharing options...
false Posted December 25, 2009 Report Share Posted December 25, 2009 (edited) mysql_query("DELETE FROM cw WHERE km2 = '".$km2."'") or die(mysql_error()); ? Edited December 25, 2009 by false Quote Link to comment Share on other sites More sharing options...
drellout Posted December 25, 2009 Author Report Share Posted December 25, 2009 Aizmirsu pateikt km2 - pretinieku komanda un parejais lkm zinat #2 Tu man uzdod jautājumu :D es vsp nezinu Quote Link to comment Share on other sites More sharing options...
false Posted December 25, 2009 Report Share Posted December 25, 2009 (edited) <?php if($_POST['dzest']){ $km2 = $_POST['clanwars']; mysql_query("DELETE FROM cw WHERE km2 = '".$km2."'") or die(mysql_error()); } ?> <form method="post"> <strong>Ko dzēst ?</strong><br> <select name="clanwars" size="1" > <option value="fnatic">1tm vs 2tm</option> <option value="sk">1tm vs 2tm</option> </select> <input name="dzest" type="submit"> </form> Edited December 25, 2009 by false Quote Link to comment Share on other sites More sharing options...
drellout Posted December 25, 2009 Author Report Share Posted December 25, 2009 apmēram sapratu, un kā tālāk darīties ? :D Atvaino bet es gandrīz php nerubiju Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted December 25, 2009 Report Share Posted December 25, 2009 Tad varbūt sāc mācīties? Ja negribi, tad maksā kādam kas tev to uztaisīs. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.