Hola
Tengo el siguiente script
<?php
include("conex_dg.phtml");
$link=Conectar();
//$link2=Conectar();
mysql_query("insert into historial
values ('$id_hist','$hist_fech','$hist_gpo','$hist_cic','$cmfi','$cmfr','$cmgc','$cmge','$cmgec','$cg','$asp','$aasc','$nec_esp','$obs','$aid','$zona','$jardin','$deleg','$cve')",$link);
mysql_query("insert into alumno
values('$id_alum','$nombre_n')",$link); // ahora es tan sencillo como hacer
//echo $consulta;
if (!mysql_query($link)) {
//echo "Error en la consulta: $consulta";
echo "MySQL dice: ".mysql_error();
exit;
}
pero obtengo el siguiente error:
MySQL dice:
You have an error in your SQL syntax.
Check the manual that corresponds to your MySQL server version for the right syntax
to use near 'Resource id #1' at line 1
Aunque SI inserta los datos en las dos tablas diferentes no he podido quitar el mensaje de error.
Si alguien me puede ayudar?
Gracias