|
kind of hard! ! ! If it is an ID, then using re.getString will still make an error
It’s better to judge the string NAME before querying the database. If the value of NAME is city, country, then use String[] to separate, name[0]="city",name[1]="country", then take it out to the database Then you can judge based on this
if(name[0].equals("city"))
{
String pstrcity=re.getString(1);
}
if(name[0].equals("country"))
{
String pstrcountry=re.getString(1);
} |
|