I am trying to pass a string to a Mid() function, return a portion of the string, and then convert that portion to an int. My attempt looks like this..
char * ReceivedStr;
char * Mid(char * inString, int Start, int Length );
main()
{
int i;
int dis;
char * Distance;
ReceivedStr = "Move125";
Distance = Mid(ReceivedStr , 4, 3);...
Search Result
Collapse
2 results in 0.0013 seconds.
Keywords
Members
Tags
-
Passing strings to and from functions
-
extracting info from LDAP column?
I have a table with one of the columns being ldap info. Example value would be:
ou=FOO,ou=BAR,o =XYZ,dc=WORLD
From this I would like to extract the first string, in this case FOO.
My last attempt was:
[CODE=mysql]SELECT 1+instr(T.ldap, "=") as startpos,
instr(T.ldap,", ") as endpos,
mid(T.ldap,star tpos,endpos-startpos)
FROM myTable...