I have a VARCHAR value in a table that I want to retrieve and increment.
I have tried this:
Step 1 - Retrieve the value (fine, no problem)
mysql> select MAX(sub_no)AS sub_no from proj_sub;
+---------+
| sub_no |
+---------+
| 1002-02 |
+---------+
1 row in set (0.00 sec)
Step 2. (this is where I'm stuck)
I want to format this using mySQL to read 1002-03. Is this possible or will I have to use PHP to do it?
Thomas Shearer
Multimedia Developer
I have tried this:
Step 1 - Retrieve the value (fine, no problem)
mysql> select MAX(sub_no)AS sub_no from proj_sub;
+---------+
| sub_no |
+---------+
| 1002-02 |
+---------+
1 row in set (0.00 sec)
Step 2. (this is where I'm stuck)
I want to format this using mySQL to read 1002-03. Is this possible or will I have to use PHP to do it?
Thomas Shearer
Multimedia Developer