User Information from MySQL

This example returns user information from MySQL:

// Begin of Example
Use Mertech.inc
String sID sUser sHost sDB sCommand sTime sState sInfo
Login "localhost" "root" "mertech" "MDSMYSQL"
SQL_SET_STMT TO "show processlist" SQL_PREPARE_STMT SQL_EXECUTE_STMT
Repeat
  SQL_FETCH_NEXT_ROW into sID sUser sHost sDB sCommand sTime sState sInfo
  [ Found ] Begin
     Showln "ID     : "sID
     Showln "User   : "sUser
     Showln "Host   : "sHost
     Showln "DB     : "sDB
     Showln "Command: "sCommand
     Showln "Time   : "sTime
     Showln "State  : "sState
     Showln "Info   : "sInfo
     Showln
     Showln "Presse any key ..."
     Showln
     Inkey Pageend
  End
Until [ Not Found ]
Showln Showln "Ok ...." Inkey Pageend
// End of Example

Tags:

Leave a Reply