refiking Posted January 2, 2008 Share Posted January 2, 2008 What I want to do is give each loan a unique identifier but I don't know how to code it correctly because I got the error message. What should I change this to? $loanid = mysql_num_rows($loid) + 1; $lid = "KF402"$loanid; If the loanid was 65, for example, I'd want $lid to = KF40265 Quote Link to comment https://forums.phpfreaks.com/topic/84046-solved-how-do-i-code-this/ Share on other sites More sharing options...
rempires Posted January 2, 2008 Share Posted January 2, 2008 $loanid = mysql_num_rows($loid) + 1; $lid = "KF402".$loanid; the "." combines the 2 Quote Link to comment https://forums.phpfreaks.com/topic/84046-solved-how-do-i-code-this/#findComment-427798 Share on other sites More sharing options...
Daukan Posted January 2, 2008 Share Posted January 2, 2008 Be careful using mysql_num_rows if a loan is deleted the row count will go down and create duplicate numbers. Quote Link to comment https://forums.phpfreaks.com/topic/84046-solved-how-do-i-code-this/#findComment-427816 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.