Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

188
Vistas
How to print the response of a query made within a web service on the screen?

I have this view, through a sql query I recover the level of the registered user, if the level is 9 it will perform another query if the level is 1 I must compose an error message and then print it in my html page through jquery , how can I do in C?

This is my code inside my web service.

if (strcmp(ws_method_external,"Metodo_Approva")==0)
        {
        
            if(pk_dbquery("Datarecovery","select * from utentiapplicazione where nomeapplicazione='wbc_gestionepacchetti800' and login='%s'",ws_login)<0)
            {
                pk_errmsg(PK_FALSE,PK_ERRQUERY,"Datarecovery",PK_DBERRNO,PK_DBERRMSG);
            }
            
            pk_dbfetchrow("Datarecovery");
            sprintf(livello_login,"%s", pk_dbfetchfield("Datarecovery","livello"));
        
            if(!strcmp(livello_login, "9"))
            {
                if(pk_dbquery("AccessUpdate","update ptpacchetti800 set loginapprovazione='%s', dataapprovazione=now() where id='%s'",ws_login,id)<0);
                {
                    pk_errmsg(PK_FALSE,PK_ERRQUERY,"AccessUpdate",PK_DBERRNO,PK_DBERRMSG);
                }
            }
            if(!strcmp(livello_login, "1"))
            {
                //Here the code
            }
        }
     }

This is my javascript code making the call.

        function FunctionApprova(OggettoID) {
        var id = OggettoID.value;
        $.ajax({
            url: pacchetti_wsurl + 'ws_json_gestionepacchetti800',
            type: 'GET',
            data: {
                ws_method_external: 'Metodo_Approva',
                ws_login: readCookie("wc_login").replace(/\"/g, ""),
                ws_password_type: 'C',
                ws_pwd: encodeURI(readCookie("wc_password").replace(/\"/g, "")),
                id: OggettoID.value,
                id,
            },
            dataType: "json",
            encode: true,
        }).done(function(data) {
            /*window.location.replace('./wbc_gestionepacchetti800.html');*/
        });
        event.preventDefault();

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda