Skip to content

Instantly share code, notes, and snippets.

@cesjam7
Created January 21, 2016 21:25
Show Gist options
  • Save cesjam7/7378a2e763e5b843ab4a to your computer and use it in GitHub Desktop.
Save cesjam7/7378a2e763e5b843ab4a to your computer and use it in GitHub Desktop.
<?php
// Function add orden data
function insert_orden($idpost, $idauto, $idcliente, $idarrendatario, $contacto_nombre, $contacto_telefono, $contacto_email, $facturar, $ruc, $direccion, $fecha_ingreso, $hora_ingreso, $fecha_diagnostico) {
global $wpdb;
$table = "wp_ordenes";
$wpdb->insert($table, array('idpost'=>$idpost,
'idauto'=>$idauto,
'idcliente'=>$idcliente,
'idarrendatario'=>$idarrendatario,
'contacto_nombre'=>$contacto_nombre,
'contacto_telefono'=>$contacto_telefono,
'contacto_email'=>$contacto_email,
'facturar'=>$facturar,
'ruc'=>$ruc,
'direccion'=>$direccion,
'fecha_ingreso'=>$fecha_ingreso,
'hora_ingreso'=>$hora_ingreso,
'fecha_diagnostico'=>$fecha_diagnostico,
'fecha_entrega'=>''),
array('%d', '%d', '%d', '%d', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s'));
return true;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment