can someone please tell me how i can search a mysql database, what i need is for it to search for the username and password and see if they match in the database, i am completley new to mysql, i have through a example managed to connect to the database and disaply it with this:

VB Code:
  1. Option Explicit
  2.  
  3.   Private cn As New ADODB.Connection
  4.   Private rs As New ADODB.Recordset
  5.   Private cnString As String
  6.   Private sSQL As String
  7.  
  8. Private Sub cmdExecute_Click()
  9.  
  10. On Error GoTo ErrHandler
  11.  
  12.   Dim sTable As String
  13.  
  14.     sTable = "phpbb_users"
  15.    
  16.     cnString = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=" & "*****" & ";PORT=3306;" & _
  17.                     "DATABASE=" & "*******" & ";USER=" & "888888" & ";PASSWORD=" & "*******" & _
  18.                     ";OPTION=3;"
  19.    
  20.     cn.ConnectionString = cnString
  21.     cn.Open
  22.    
  23.    
  24.     If chkQuery.Value <> 1 Then sSQL = "Select * from " & sTable
  25.    
  26.     rs.Open sSQL, cn, adOpenDynamic, adLockOptimistic
  27.    
  28.     Set MSHFlexGrid1.Recordset = rs
  29.  
  30.     Set cn = Nothing
  31.     Set rs = Nothing
  32.     Exit Sub
  33. ErrHandler:
  34.     MsgBox Err.Description, vbCritical
  35.     Resume Next
  36. End Sub

i dont know if this matters but the field headings are username and user_password, any help or a point in the right direction would bre great