Announcement

Collapse
No announcement yet.

select and where

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • select and where

    hy, i use a code for select in a form and works:
    SELECT id, sc_concat(Societa,' - ', Indirizzo,' - ', piva,' - ', codice_fiscale)
    FROM clienti
    ORDER BY Societa, Indirizzo, piva, codice_fiscale

    but if i add a where not works,error sql:

    WHERE
    ( {Stato Anagrafica} )=' 1'

  • #2
    Code:
    SELECT id, sc_concat(Societa,' - ', Indirizzo,' - ', piva,' - ', codice_fiscale) 
    FROM clienti 
    WHERE Stato Anagrafica = 1
    ORDER BY Societa, Indirizzo, piva, codice_fiscale

    Is this in a form or a grid, i know you said form. But form have a where condition section! Do you mean that?

    Form
    fileupload.png

    or

    Grid
    fileupload.png
    Last edited by mikelaw; 12-19-2014, 11:54 AM.

    Comment


    • #3
      select fails

      not works...is in a form

      I get a value from a field in another table using autocompletion, I put two photos attached
      Attached Files

      Comment


      • #4
        What is the exact name of the db field (Stato Anagrafica)?
        If you have a blank in the field name it has to be in left tick marks: `Stato Anagrafica`
        Your Where Clause would be:

        WHERE `Stato Anagrafica` = 1

        jsb

        Comment


        • #5
          I solve issue, find a field with id of primal key

          Comment

          Working...
          X