Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

180
Views
¿Cómo imprimir en pantalla la respuesta de una consulta realizada dentro de un servicio web?

Tengo esta vista, a través de una consulta sql recupero el nivel del usuario registrado, si el nivel es 9 realizará otra consulta si el nivel es 1 debo redactar un mensaje de error y luego imprimirlo en mi página html a través de jquery, ¿Cómo puedo hacer en C?

Este es mi código dentro de mi servicio web.

 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 } } }

Este es mi código javascript haciendo la llamada.

 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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!