怎么样读下面的一个MySql 的 table:--------------------
row_id - message   - 
--------------------
 1     -TK Apple   -
--------------------
 2     -TK Dan     -
--------------------
 3     -TK Jing    -
--------------------
这个表格的message记录的是player选择要玩的游戏名字”TK“和他们的名字(比如说Apple); 我现在可以用SELECT message FROM table读取到了所有在message里的内容,要怎么做才可以读取到玩家的名字呢,就是:Apple,Dan,Jing.

解决方案 »

  1.   

    select player from tt where 游戏名字="TK"
      

  2.   

    TK 和玩家的名字是在一个格格里面的啊,他不是单独的一个colume,就是一个格里有很多字,想只拿取其中玩家的名字,可以实现吗 
      

  3.   

    #include <stdio.h>
    #include <iostream>
    #include <string.h>
    #include <string>
    using namespace std;
    int main ()
    {
      char str[] ="sample string you.";
      char* pch;  printf ("Splitting string \"%s\" into tokens:\n",str);
      pch = strtok (str," ,.-");
     
      string first[3];
      //string second;
      first[0] = pch;
      first[1] = strtok(NULL, " ,.-");
      first[2]=first[1];
       first[2] = strtok(NULL, " ,.-");
      cout<<"first: "<<first[0]<<endl;
      cout<<"second: "<<first[1]<<endl;
      cout<<"third: "<<first[2]<<endl;
      return 0;
    }
    ///////////////////////
    你用以上c++ 语言编程就可以把读出来的整个string 分开来了。。