Subject Findkey on mysql
From Onwu Bami <bamionwu@yahoo.com>
Date Wed, 01 Jul 2015 11:03:04 -0400
Newsgroups dbase.getting-started

Hello all,

How do I recode the below .dbf findkey code to mysql code.

local lookfor
      lookfor=this.value
      //I am referencing the table directly here because
      //I had previously dragged the table to the form surface.
      If form.mainaccount1.rowset.findKey( lookfor )
         form.entmainacctno.value:=form.mainaccount1.rowset.fields['mainacctno'].value  
         form.entmainacctname.value:=form.mainaccount1.rowset.fields['mainacctname'].value  
                        form.entmainaccttype.value:=form.mainaccount1.rowset.fields['mainattype'].value  
      ELSE
         msgbox('Main Account Not Updated')
         RETURN true
      ENDIF
      return

Thanks all.

Bami