Jump to content

patchido

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by patchido

  1. Hi, i can't manage to think on how to update 2 tables in 1 same query. here is my context. i have a table called "guias" with a primary incremental key "id" and another field called "guia". the other table called "tblpaqueteria" has "id" a field called "guia_id" (this one matches a record from the other table) and the last field called "Estatus". i get 2 arrays via post method to my php function, one filled with the "guia_id" i want to modify, and another with the "guia" number i want to update the info to. here is my code: $ids = $_POST['ids']; $os = $_POST['os']; $sql = "UPDATE tblpaqueteria SET Estatus = 2 "; $sql .= "WHERE guia_id IN ("; foreach($ids as $id){ $sql .= $id . ","; } $sql = rtrim($sql, ','); $sql .= ")"; this works great, i change the field "Estatus" to the lines i need to, but know i also need to add the $os info to the lines in the other table matching the "id" field. HELP PLZ! THANKS
  2. thanks for your answer, how am i supposed to do that?(pardon my ignorance)
  3. Hi, i am pretty new to javascript, and i don't know why IE won't show as excpected since the functions i am using appear to be compatible with the browser, basically what isn't working is a canvas that is being drawn with javascript. here is my code, i hope someone can help me a bit. ( it works on chrome). here is my code. <!DOCTYPE html><html><head> <title>Paqueteria Qualtia</title> <input type="hidden" id="id_log" value="2"></input> <link href="stylesheets/public.css" media="all" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script> <script type="text/javascript"> $(document).ready(function(){ $('canvas').each(function(){ if(this.getContext){ var context = this.getContext('2d'); var arrayColor = ["Red","Red","Red","Red","Red","Red","Red"]; //alert($(this).attr('class')); for(var i=0;i<=$(this).attr('class');i++){ arrayColor[i]="Green"; if(i<6) arrayColor[i+1]="Orange"; } var array1 = ["Registro","Cluster Asignado","Salida de embarques","Transito","Llegada de embarques","Paquete en cedis","Recibido"]; for(var i=0;i<7;i++){ context.fillStyle = arrayColor[i]; context.beginPath(); context.arc(20+i*80, 5, 5, 0, 2*Math.PI); context.closePath(); context.fill(); } for(var i=0;i<7;i++){ var txt = array1[i]; context.beginPath(); context.fillStyle = arrayColor[i]; context.font="11px Arial"; var y = 0; if(i%2==0){y=31} else{y=20}; context.fillText(txt,20+i*80-context.measureText(txt).width/2,y); } for(var i=0;i<6;i++){ context.strokeStyle = arrayColor[i+1]; context.beginPath(); context.moveTo(25+i*80,5); context.lineTo(100+i*80-5,5); context.stroke(); } } }); }); </script> </head><body> <div class="colmask leftmenu"><div class="colleft"> <div class="col1"> <br /><label class="send">Enviados</label><br /> <table class="send"><tr><th><p>Nombre</p></th><th><p>Apellido</p></th><th><p>Correo</p></th><th><p>Guia</p></th><th><p>Estatus</p></th></th><tr><td><p>GUILLERMO</p></td><td><p>BUELNA</p></td><td><p>gbuelna@qualtia.com</p></td><td><p>6</p></td><td><canvas class="2" width="540" height="35"></canvas></td></tr><tr><td><p>PAULA MERCEDES</p></td><td><p>DODDOLI</p></td><td><p>pdoddoli@qualtia.com</p></td><td><p>7</p></td><td><canvas class="6" width="540" height="35"></canvas></td></tr><tr><td><p>JORGE LUIS</p></td><td><p>BOJORQUEZ</p></td><td><p>jbojor@qualtia.com</p></td><td><p>8</p></td><td><canvas class="2" width="540" height="35"></canvas></td></tr><tr><td><p>MARCELA</p></td><td><p>ANDRADE</p></td><td><p>mandrade@dominio.qualtia.com</p></td><td><p>9</p></td><td><canvas class="2" width="540" height="35"></canvas></td></tr><tr><td><p>SAMANTHA AURELV</p></td><td><p>DURAN</p></td><td><p>sduran@qualtia.com</p></td><td><p>10</p></td><td><canvas class="2" width="540" height="35"></canvas></td></tr><tr><td><p>AARON HUMBERTO</p></td><td><p>GARCIA</p></td><td><p>aumberto@qualtia.com</p></td><td><p>12</p></td><td><canvas class="2" width="540" height="35"></canvas></td></tr><tr><td><p>SIRAHUEN ARTURO</p></td><td><p>BALTAZAR</p></td><td><p>sbaltaza@qualtia.com</p></td><td><p>13</p></td><td><canvas class="6" width="540" height="35"></canvas></td></tr><tr><td><p>ABRAHAM</p></td><td><p>ANGUIANO</p></td><td><p>aanguian@dominio.qualtia.com</p></td><td><p>15</p></td><td><canvas class="6" width="540" height="35"></canvas></td></tr></table> <br /><label class="recieve">Recibir</label><br /> <table class="recieve"><tr><th><p>Nombre</p></th><th><p>Apellido</p></th><th><p>Correo</p></th><th><p>Guia</p></th><th><p>Estatus</p></th></th></table> </div> <div class="col2"> <h1>Menu</h1> <ul class="subjects"> <li><a href="registro.php">Registrar Envio</a></li><li><a href="guias.php">Checar Guias</a></li><li><a href="perfil.php">Editar Perfil</a></li><li><a href="cedis.php">Cedis</a></li><li><a href="embarques.php">Embarques</a></li><li><a href="usuarios.php">Gestion Usuarios</a></li><li><a href="logout.php">Salir</a></li> </ul> </div> </div></div> </body></html>
×
×
  • Create New...