I have mysql database like this
id | code
1 | bok-1
2 | bok-2
3 | bok-3
4 | inv-1
5 | inv-2
6 | inv-3
How do i get latest number of prefix bok-?
code which from the example above the result will be bok-3
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This works :
EDIT :
it now gives bok-11 if there is a bok-11 in the list, as I suppose 11 is greater than 3.