What I need is a function that will return information in this type of way.
First Example:
artist=5 or artist=10 and artistid=id
would be converted to this
(artist=5 or artist=10) and artistid=id
Second Example:
artistid=id and artist=5 or artist=10
would be converted to this
artistid=id and (artist=5 or artist=10)
Third Example:
song=5 and artist=5 or artist=10 and artistid=id and style=1 or style=2
would be converted to this
song=5 and (artist=5 or artist=10) and artist=id and (style=1 or style=2)
Fourth Example:
song=5 and (artist=5 or artist=10) and artist=id and style=1 or style=2
would be converted to this
song=5 and (artist=5 or artist=10) and artist=id and (style=1 or style=2)
The purpose of this is to use this in a SQL Statement to make sure that any or statements are in addition to the other statements. Must be done in VB. Should be something like this
public function convertor(statement as string) as string
convertor=newinfo
end function
Let me know if you have any questions.
## Deliverables
The source code only for the function to convert an or statement so everything the or contains are in (). If they are already in (), then leave it alone.
## Platform
Windows 2000, Windows 98, Windows XP Home Edition.