0

I want to insert into DB 000001 and 000002 and .... but inserting 1 and 2..
any body help me to solve this problem

my code is

$b = mysql_query("SELECT MAX(app_number) FROM  tb2_payment ")or die(mysql_error());


while($row_b = mysql_fetch_array($b)){

        $app_number=$row_b['MAX(app_number)'];

        if($app_number=="")
        {
        $app_number2=000001;
        }
        else
        {
        $app_number2=$app_number+1;
        }
}
echo $app_number2;
2
Contributors
5
Replies
24
Views
2 Years
Discussion Span
Last Post by ramsiva
0

Thanks for giving valuable information.

but without padding i want insert:
I am taking formid from DB maximum value is 000001.
Next time submit click means it will take max value from DB and increment automatically to 000002 and 000003

any body help me to solve this problem

0

Thanx Lau,

Its working,

All Information is available.

Very Thanx for giving information

Edited by ramsiva

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.