how to read data from mysql except "select * from mysql.database" sentens?
Hi, experts ,pls help me to find way to read data from mysql database except use "select * from database" in Java?

解决方案 »

  1.   

    there is only way to retrieve the records from the database via the SQL.of course ,you can try the table name directly.
    recordset.open "tablename"but it is the same way.[align=center]====  ====
    [/align]
      

  2.   

    if I use  select * from fsm where stateno=1, to get finalstate how to do that from the following table?**********************tsble :fsm***********************************
    stateno transitions  event  startstate finalstate callfunction hook 
    0      s0,input1,s0 input1  0            0        call0:Func0  call0 
    1      s0,input1,s1 input1  0            0        call1,Func1  call1 
    2      s1,input1,s2 input1  0            0        call2.Func2  call2 
    3      s2,input1,s0 input1  0            0        call3,Func3  call0 
      

  3.   

    Thank U!
    pls tell me in mysql!
      

  4.   

    I want read the finalstate  from my fsmtable use what kind of sentence in MYSQL?if I use 
    "select finlastate from fsm where stateno=1" is it right?
    my table is following:
    **********************table:fsm************************************
    stateno transitions  event  startstate finalstate callfunction hook 
    0      s0,input1,s0  input1   0         0          call0:Func0 call0 
    1      s0,input1,s1  input1   0         0          call1,Func1 call1 
    2      s1,input1,s2  input1   0         0          call2.Func2 call2 
    3      s2,input1,s0  input1   0         0          call3:Func3 call3
      

  5.   

    hi AmandaChenCa ,what mean the Final Status ? could you identify which record is the final one ? base on your Transition or event ?[align=center]====  ====
    [/align]
      

  6.   

    Final Status is the term of Finite State Machine , it means when reach the Final Status , if will stop there.You are right , actually I need read the state on the way (let's call it TempState)which is not the Final State,the TempState should be based on the tranistion.Thanx!I rebullded my fsm table yesterday as follow:
    stateid   transitions       event      startstate finalstate callfunction hook TempState 
    0     s0,input-stay,s0     input-stay     0          0       call0:Func0 call0 0 
    1     s0,input-forward,s1 input-forward   0          0       call1,Func1 call1 1 
    2     s1,input-forward,s2 input-forward   1          0       call2.Func2 call2 2 
    3     s1,input-stay,s1    input-stay      1          0       call3,Func3 call3 1 
    4     s2,input-back,s0    input-back      2          0       call4,Func4 call4 0 
    5     s2,input-back,s2    input-stay      2          0       call5,Func5 call5 2 
      

  7.   


    which one is the final one ? 
    do you want to calculate OEE ?[align=center]====  ====
    [/align]
      

  8.   

    I have never heard of other way expect using statement select to read data from a database.
      

  9.   

    which one is the final one ? 
    do you want to calculate OEE ?
    The final one here is "finalstate",but I made a mistake here . In fact I need TempState.For example in row 2 , from tranisitions [s0,input-forward,s1], we know the TempState is s1. I don't need calculate , only read it , thank  Liuyann!
      

  10.   

    hi AmandaChenCa ,it is very difficult for me to understand why you select the 2nd row, why not the 3nd or 4th?First of all, we need understand how you identify the row as the temporary status. however, from my view, all the row looks same.otherwise, I will useselect * from fms where stateid=2;
    or
    select * from fms where transitions='s0,input-forward,s1'; [align=center]====  ====
    [/align]
      

  11.   

    Thanx!
    row 1  only for example!I appreciate u'help