Ver Mensaje Individual
  #8 (permalink)  
Antiguo 30/03/2009, 10:01
Avatar de a83
a83
 
Fecha de Ingreso: noviembre-2005
Ubicación: Santiago de chile
Mensajes: 637
Antigüedad: 19 años, 3 meses
Puntos: 1
Respuesta: Como puedo valiadar que el reguitro no se ingrece 2 beces

VL.2 me envia el siguiente error

Parse error: syntax error, unexpected '}', expecting ',' or ';' in C:\xampp\htdocs\siap\op\carga_op.php on line 135


Código PHP:
$cliente=$_POST['tblclientes'];
$fechaFormat=$_POST['FechaInicio'];
$fecha=cambiaf_a_mysql($fechaFormat);
$operario=$_POST['tblempleados'];
$Turno=$_POST['tbltipoturno'];
$Numero=$_POST['Numero'];

$ban 0;
$q_sqla "select * from tbl_op where Id_Empleado='{$_POST['Id_Emplead']}' and Fecha='{$_POST['Fecha']}'";
$r_sqla mysql_query($q_sqla);
$n_sqla mysql_num_rows($r_sqla);
if(
== $n_sqla)
{
// "Hacer resto de proceso";
}
else
{
echo 
"No se puede ingresar porque está duplicado"
}
$insert="insert into tbl_op (Fecha, id_Cliente, Id_Empleado, id_TipoTurno) values ('".$fecha."',".$cliente.",".$operario.",".$Turno.")";
$resIns=mysql_query($insert);
$idop=mysql_insert_id();
/*echo"<script>alert(\"$cliente\")</script>";*/
$sql "SELECT * FROM tblproducto WHERE id_cliente='".$cliente."'";
/*echo"<script>alert(\"$sql\")</script>";*/
$resSql=mysql_query($sql);
$numProductos=mysql_num_rows($resSql);
//para el cliente
$sqlC "SELECT * FROM tblempleados WHERE Id_Empleado='".$operario."'";
/*echo"<script>alert(\"$sqlC\")</script>";*/
$resSqlC=mysql_query($sqlC);
$rowClient=mysql_fetch_array($resSqlC);
//para el N de Guiass
$sqlA "SELECT * FROM tbl_op WHERE id_op='".$idop."'";
/*echo"<script>alert(\"$sqlA\")</script>";*/
$resSqlA=mysql_query($sqlA);
$rowGuias=mysql_fetch_array($resSqlA);
//para el cliente
$sqlo "SELECT * FROM tblclientes WHERE id_Cliente='".$cliente."'";
/*echo"<script>alert(\"$sqlC\")</script>";*/
$resSqlo=mysql_query($sqlo);
$rowCliente=mysql_fetch_array($resSqlo);
}
?>