Basically what I am trying to do is when I delete a client with an ID of lets say 6 and I have 50 clients, I then want to update the client with the ID of 50 to 6.
This is my code, in PHP, but it won't execute 2 mysql_query
-s at the same time at least I think that's the problem. Otherwise the SQL syntax works fine.
public function delete () {
$last=$this->numrow; //contains last ID works fine
if (isset ($_GET['x'])) {
mysql_query('DELETE FROM proba WHERE ID ='.$_GET['x']);
mysql_query('UPDATE proba SET ID='.(int)$_GET['x'].'WHERE ID='.(int)$last);
}
}
The $_GET['x']
contains the ID on which it was clicked . But only the first mysql_query
gets executed how do i make it so the second one gets executed also ?
And another question is is it possible to get <a href="munka/index.php?x=5" > [-] </a>
the x=5 with a $_POST
?