Hi,
I am using the script below to update a table with some
information. However, after I ran the script once, unless
I wait for 1-2 minutes, the script will not enter new
information into my table when I ran it again.
Does anybody know why? Is there something
I can change in the script to avoid this delay?
Thanks a million in advance,
-Victor Arellano
===============================================================
$link = mysql_connect("localhost", "vmarellano", "******") or DIE("Unable to connect to database");
@mysql_select_db("vmarellano") or DIE("Unable to select database");
$result = mysql_query("Select * from aredry where lote='$lote' and job='$job'");
if(!mysql_numrows($result)) {
#crea un nuevo lote
$result = mysql_query("insert into aredry(cia,job,lote,fecha,plan,direccion,ciudad,ar_1_2X4X8R,
ab_1_2X4X8R,ar_1_2X4X12R,ab_1_2
X4X12R,ar_5_8X4X8FC,ab_5_8X4X8FC,ar_5_8X4X12FC,ab_5_8X4X12FC,ar_1_2X4X8WB,ab_1_2X4X8WB,ar_5_8X4
X8WB,ab_5_8X4X8WB,ar_1_2X4X12CD
,ab_1_2X4X12CD,ar_1_2X4X9R,ab_1_2X4X9R,ar_1_2X54X8R,ab_1_2X54X8R,ar_1_2X54X12R,ab_1_2X54X12R,g_
1_2X4X8R,g_1_2X4X12R,g_5_8X4X8F
C,g_5_8X4X12FC,specialins) values (
'$cia',
'$job',
'$lote',
'$fecha',
'$plan',
'$direccion',
'$ciudad',
'$ar_1_2X4X8R',
'$ab_1_2X4X8R',
'$ar_1_2X4X12R',
'$ab_1_2X4X12R',
'$ar_5_8X4X8FC',
'$ab_5_8X4X8FC',
'$ar_5_8X4X12FC',
'$ab_5_8X4X12FC',
'$ar_1_2X4X8WB',
'$ab_1_2X4X8WB',
'$ar_5_8X4X8WB',
'$ab_5_8X4X8WB',
'$ar_1_2X4X12CD',
'$ab_1_2X4X12CD',
'$ar_1_2X4X9R',
'$ab_1_2X4X9R',
'$ar_1_2X54X8R',
'$ab_1_2X54X8R',
'$ar_1_2X54X12R',
'$ab_1_2X54X12R',
'$g_1_2X4X8R',
'$g_1_2X4X12R',
'$g_5_8X4X8FC',
'$ab_1_2X4X9R',
'$ar_1_2X54X8R',
'$ab_1_2X54X8R',
'$ar_1_2X54X12R',
'$ab_1_2X54X12R',
'$g_1_2X4X8R',
'$g_1_2X4X12R',
'$g_5_8X4X8FC',
'$g_5_8X4X12FC',
'$specialins')");
echo "Records actualizados: ";
mysql_affected_rows($link);
mysql_close($link);