title: How to use sqlx to do queries with table fields and parameters?
body: <p>I would like to ask about possible strategies to prepare the status of a query with the following structure:</p>
  
  <pre><code>select TABLE_COLUM from TABLE where OTHER_TABLE_COLUMN = {'$ 1 PARAMETER'},
  </code></pre>
  
  <p>The language is Go and the sqlx library.</p>
  
  <p>I am using a function with the following structure:</p>
  
  <pre><code>type Translation struct {
      Translation string
  }
  </code></pre>
  
  <pre><code>type TranslateParams struct {
      Originlanguaje string 
      Wordtotranslate string
      Targetlanguaje string 
  }
  </code></pre>
  
  <pre><code>//TranslateWordUsingDB... TranslateWordUsingDB search one word translation in DB
  func ObtainTranslationUsingDB(validationforuse bool,originlang string, word string, targetlang string)([]Translation, error){
      translation := []Translation{}
      if validationforuse == true{
          fmt.Println("preparing....")
          params := TranslateParams{
              Originlanguaje  : originlang,
              Wordtotranslate : word,
              Targetlanguaje  : targetlang,
          }
          nstmt, err := db.Conn.PrepareNamed(`select :targetlanguaje as translation from translations where :originlanguaje = :wordtotranslate`)
          if err != nil{
              return translation, err
          }
          fmt.Println("prepared")
          error := nstmt.Select(&amp;translation, params)
          if error != nil {
              return translation, error
          }
          fmt.Println(translation)
      }
      return translation, nil
  }
  </code></pre>
  
  <p>But this does not work and I have not managed the methods of <a href="https://jmoiron.github.io/sqlx/#namedParams" rel="nofollow noreferrer">https://jmoiron.github.io/sqlx/#namedParams</a>
  because they replace TABLE_COLUMN with "TABLE_COLUMN" and this does not allow the query to work.</p>