No hace insert into
Publicado por Mari (6 intervenciones) el 05/06/2014 09:03:41
Buenas tardes,
Tengo el siguiente código y no me hace insert en la tabla. ¿sabriais decirme por que? Gracias de antemano.
Tengo el siguiente código y no me hace insert en la tabla. ¿sabriais decirme por que? Gracias de antemano.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
if (!defined('sugarEntry') || !sugarEntry) die ('Entry point no valido');
$con=mysqli_connect("localhost","user","pass","tabla");
$qry = "SELECT id from accounts where accounts.industry = 'Education'";
$Result = $GLOBALS['db']->query($qry);
mysql_close($con);
while($res = $GLOBALS['db']->fetchByAssoc($Result))
{
echo $res['id']."<br>";
$Result_n = $GLOBALS['db']->query($qry_);
if (!$result_n)
{
$con=mysqli_connect("localhost","user","pass","tabla");
$sql_w="Insert into accounts_cstm (entry_point_check_c,id_c) values (1,'8cc83a41-2286-5fb7-36cf-5326e4707129')";
echo $sql_w;
mysql_query($sql_w,$con);
echo $sql_w,$con;
if(! $retval )
{
die('Could not enter data: ' . mysql_error());
}
echo "Entered data successfully\n";
mysql_close($con);
}
else
{
}
}
?>
Valora esta pregunta


0