I am trying to get mid part of string. My table is like below :
id machine model
1 lathe ISO-678-1567
I want to get mid part like 678 fro machine model.
Desred output:
id machine model midcode
1 lathe ISO-678-1567 678
Currently I am doing same with PHP codwe. But I think it will be better to do in Mysql query itself. Please help me how to do this ?
use
MID(str,pos,len)mysql function that will do this.