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 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 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. 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
Archived
This topic is now archived and is closed to further replies.