I need your help, I have a table whith two column, an id and numpos, i want that the id and numops has the same result.
exemple :
$cnx = mysql_connect( "localhost", "root", "" );
$db = mysql_select_db( "maincourante" );
$sql = mysql_query("INSERT INTO ops (id) values('')");
$req = mysql_query("SELECT LAST_INSERT_ID() as id FROM ops");
$data = mysql_fetch_array($req);
$upd = mysql_query("UPDATE `ops` SET `numops`=`idops` WHERE `idops`=$data");
mysql_query($upd, $cnx) or die(mysql_error());
mysql_close();`
thanks for your help
Try this:
This works for mysql:
This works for php:
Or