Help with MYSQL

So i have been playing with some code and im feeling through all of this. i have a Mysql Db setup. open read/write access on the local host. im trying to get this dial plan to write to the database. here is the code i have.

  include=CallingRule_outbound
  include=default
  include=parkedcalls
  include=conferences
  include=ringgroups
  include=voicemenus
  include=queues
  include=voicemailgroups
  include=directory
  include=pagegroups
  include=page_an_extension
  exten=500,1,Answer(500)
  exten=500,n,MYSQL(Connect connid localhost admin XXX testdatabase)
  exten=500,n,Wait(3)
  exten=500,n,Authenticate(63876)
  exten=500,n,Playback(EmployeeID)
  exten=500,n,Wait(1)
  exten=500,n,Read(EmployeeID,beep,8,si,2,20)
  exten=500,n,MYSQL(Query resultid ${connid} SELECT code From temp WHERE id={EmployeeID})
  exten=500,n,Wait(2)
  exten=500,n,Playback(WorkOrder)
  exten=500,n,Wait(1)
  exten=500,n,Read(workorder,beep,8,si,2,20)
  exten=500,n,MYSQL(Query resultid ${connid} SELECT code FROM temp WHERE woid={workorder})
  exten=500,n,Wait(2)
  exten=500,n,Playback(Inspection#)
  exten=500,n,Wait(1)
  exten=500,n,Read(inspection,beep,8,si,2,20)
  exten=500,n,MYSQL(Query resultid ${connid} SELECT code FROM temp WHERE inspnum={inspection})
  exten=500,n,Wait(2)
  exten=500,n,Playback(Status)
  exten=500,n,Wait(1)
  exten=500,n,Read(status,beep,8,si,2,20)
  exten=500,n,MYSQL(Query resultid ${connid} SELECT code FROM temp WHERE status={status})
  exten=500,n,Playback(ThankYou)
  exten=500,n,Wait(3)
  exten=500,n,MYSQL(Disconnect ${connid})
  exten=500,n,Hangup()

Any help as to what i’m missing etc it doesn’t seem to write to the database.

which part of this do you think is supposed to write to the database?

(1) writing to a database is done with INSERT or UPDATE statements. Maybe you should go buy a book on SQL syntax.
(2) even with the incorrect statements, you are not passing in any values …as in, for example, WHERE id=${EmployeeID}