mardi 1 mars 2016

Extjs Secure sql wont accept update query

Ißm trying to update specific culumns in my sql database. Im using the modern toolkit and the sencha space api.

My update query

 tx.query('update ' + TABLE_NOTIZEN_LISTE +  ' set kategorie=' + typ + ', titel=' + titel + ', bemerkung=' + bemerkung + ' where notizenID = ?', [id]).then(function (rows) {


            rows.forEach(function (entry) {

                console.log(entry);
            });


        }).error(function (e) {
            console.log("DATABASE: error when updateing  notiz with id: " + id, e);
        });

        tx.execute().error(function (e) {
            Ext.space.Logger.error("Error with TX?", e);
        });

My console delivers:

Error with TX? Could not execute statement: no such column: Typ3: , while compiling: update notizenliste set kategorie=Typ3, titel=Hhxh, bemerkung=Dhdd where notizenID = ?

Looks like hes´s interpreting the value as a column. but why?

Somebody an idea?

Greetings

Aucun commentaire:

Enregistrer un commentaire