gruetztian
12-04-2003, 03:05 AM
-if i send a sqlquery like this
$query = "insert into usertable (uname,ufamilyname,ubd,ustreet,ucity) values ("hans","wurst","1979-04-19","dorfstrasse","stralsund");";
-with the php function
mysql_query($query,$conn);//the connection to the database is established
-to a database(table) like this
UID int(8) not null primary key auto_increment, //primary key
uname varchar(255) not null,
ufamilyname varchar(255) not null,
udb date not null,
street varchar(255) not null,
city varchar(255) not null,
-is it then possible for php, after sending the query, to get the UID that was generated by the databaseserver for this "record" without sending a new query?
-i think i saw anywhere that that is possible but i cant remind where ive saw it.Help!!!
$query = "insert into usertable (uname,ufamilyname,ubd,ustreet,ucity) values ("hans","wurst","1979-04-19","dorfstrasse","stralsund");";
-with the php function
mysql_query($query,$conn);//the connection to the database is established
-to a database(table) like this
UID int(8) not null primary key auto_increment, //primary key
uname varchar(255) not null,
ufamilyname varchar(255) not null,
udb date not null,
street varchar(255) not null,
city varchar(255) not null,
-is it then possible for php, after sending the query, to get the UID that was generated by the databaseserver for this "record" without sending a new query?
-i think i saw anywhere that that is possible but i cant remind where ive saw it.Help!!!