Newbie MySQL problem

From: Date: Tue, 26 Sep 2000 06:13:56 +0000
Subject: Newbie MySQL problem
Groups: php.general 
Request: Send a blank email to php-general+get-17533@lists.php.net to get a copy of this message
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!

« previous php.general (#17533) next »