On Fri, 16 Mar 2007 22:28:54 -0500 "Jeff" <[EMAIL PROTECTED]> wrote:
> Is there a way to get the last Record # created by the DB.
>
>
> $query = "INSERT INTO `t_users` (`user_id`, `f_name`, `l_name`,
> `e_mail`, `b_date`, `pic`) VALUES ('', '$f_name', '$l_name',
> '$e_mail', '$b_date', '')";
> $result = mysql_query($query);
> if(!$result)
> {
> die("Could not query the database: <br/>".mysql_error());
> }
> echo "Your Player information has been stored OK.<br />";
>
> what code could I add here to make the following line work?
>
> echo "REMEMBER your USER ID# you will need it when creating
> Characters!! It is: $user_id"; <----- I want to show the "user_id"
> just created here.
>
> Thanks in advance!
>
select user_id from t_users where user_id = (select max(user_id) from
t_users)
--
Rod
-----
Empty your mind, be formless, shapeless like water.
Now you put water into a cup and it becomes the cup.
You put water in a bottle it becomes the bottle.
You put it into a teapot it becomes the teapot.
Now water can flow or it can crash.
Be water, my friend.
-- Bruce Lee
signature.asc
Description: PGP signature

