Here is my query part of my registration PHP form.
columns account
,password
,email
and age
could be inserted by registration page user and they work well but, the column account_id
needs to be increased by 1 automatically with each registration process.
Table name is Account
not account and column name is account_id
.
$query = "INSERT Account( account,password,email,pk_,type_ ) VALUES('$username','$converted_password','$email',1,'$age')";
$query_total = mssql_query("SELECT COUNT(account_id) FROM Account");
$results_check = mssql_query($query_check);
$results_total = mssql_fetch_row($query_total);
$result_total = $results_total['0'];
It gives me a NULL value for the (account_id) column and INSERT fails.