Hi all,
I tried to find my mistake on my own bu I couldn't so I am looking for your help!
I have an id which is auto incremented each time I insert a new row. How can I select the last inserted row which coresponds to the higher id?
Here is my code:
<?php $link=mysql_connect ( "dbase","user","pass") or die("1");
mysql_select_db('dbasename',$link) or die("2");
$result = mysql_query("select id,name from members order by id)") or die("3");
$go= mysql_fetch_array($result) or die("4");
$ids=$go["id"];
$names=$go["name"];
echo("&names=$names");
echo("&ids=$ids");
?>
I tried to find my mistake on my own bu I couldn't so I am looking for your help!
I have an id which is auto incremented each time I insert a new row. How can I select the last inserted row which coresponds to the higher id?
Here is my code:
<?php $link=mysql_connect ( "dbase","user","pass") or die("1");
mysql_select_db('dbasename',$link) or die("2");
$result = mysql_query("select id,name from members order by id)") or die("3");
$go= mysql_fetch_array($result) or die("4");
$ids=$go["id"];
$names=$go["name"];
echo("&names=$names");
echo("&ids=$ids");
?>