Page 1 of 1

help spot the error

Posted: Tue Oct 11, 2005 9:15 pm
by SidewinderX
my code for the most part works but every time it runs it adds two of the same values to the database. It adds 80 different values, then after that 80 it duplicates the same 80 for a total of 120. Here is my code (its pretty messy)


The first time the script runs it parses 80 values and uploads 40 of those values into the database, then the same code is reiterated and a different 40 values are added. (but for some reason the script is executed twice.) Its probabley an error with the sepreate functions (as i didnt design that part and im use to just one big jumbble of code)

So any input is appreciated

Thanks in advanced

Posted: Tue Oct 11, 2005 9:26 pm
by feyd
$j < 80

Posted: Tue Oct 11, 2005 9:40 pm
by SidewinderX
bingo, that was it!
Thanks

Posted: Wed Oct 12, 2005 2:34 pm
by SidewinderX
here is another one
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in d:\www3\PCID\pcid2.php on line 19

Posted: Wed Oct 12, 2005 2:51 pm
by feyd
your call to mysql_query failed

Posted: Wed Oct 12, 2005 4:27 pm
by John Cartwright
cough cough

Code: Select all

$result = mysql_query() or die(mysql_error());
for more information

Posted: Wed Oct 12, 2005 5:36 pm
by SidewinderX
this is the same query



and it works perfectley fine. Also

Code: Select all

$result = mysql_query() or die(mysql_error());
didnt add any more information