Bonjour, I Have now : string(3) "134" int(0) Lunch... NOT, I haven't the time today :p but cheese and sausage is good :) Cordialement, David DURIEUX Tel : 04.74.04.81.34 Port : 06.34.99.45.18 Mail : d.durieux@xxxxxxxxxxxxx Site Web : http://www.siprossii.com/ SIPROSSII 847 route de Frans (Créacité) 69400 Villefranche sur Saône Le Wed, 3 Sep 2008 13:19:52 +0200 "Evert Lammerts" <evert.lammerts@xxxxxxxxx> a écrit: >> I have : >> >> array(2) { ["module"]=> string(12) "sousdomaines" ["deleteid"]=> >> string(3) "134" } >> >> But the ID is not deleted in mysql. > >That seems to be your var_dump($_GET), which means that either if >(isset($_GET['deleteid'])) evaluates to FALSE or your SELECT does not >return results. Let's check: > >if (strlen($_GET["deleteid"])) { > var_dump($_GET["deleteid"]); > $var = mysql_real_escape_string($_GET["deleteid"]); > $query = mysql_query("SELECT * FROM table WHERE id={$var};") >or die("select error: " . mysql_error()); > var_dump(mysql_num_rows($query)); > if ($row = mysql_fetch_assoc($query)) { > var_dump ($row); > mysql_query("DELETE FROM table WHERE id={$row['id']}") or >die("delete error: " . mysql_error()); > } >} > >> In must be away for 2 or 3 hours, I return after to continue this. >French lunch I'm guessing :-) I'm jealous! You guys know how to do >that, with your perfect cheese and sausage! I'll be away myself from >half past 2. > >Try to keep your replies on the list - it's useful for others. > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php