[PHP] Newbie MySQL problem From: Adam Charnock (adamcharnock <email protected>)
Date: 09/26/00

Hi all, im just learning MySQL and im trying to loop through a 2d array and
add its values to a table. I don't get any errors but nothing gets added to
the table. I have opened all the connections etc. so I am not sure what the
problem is:

for($a=0;$a<count($categories);$a++){

        $sqlquery = "INSERT INTO $cattable
VALUES('$id','$categories[$a][0]','$categories[$a][1]','$categories[$a][2]',
'$categories[$a][3]','0')";
        $results = mysql_query($sqlquery);
        echo
$categories[$a][0],$categories[$a][1],$categories[$a][2],$categories[$a][3],
"<br><br>\n\n\n";

}

Thanks :-)

Adam Charnock

PS. This is actually part of a news grabber from moreover.com, I have made a
non-MySQL version but it just needs speeding up. If anyone has done this I
would love to speak to them :) thanks!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>