Question in import statement
Posted: Tue Oct 16, 2007 2:20 am
Hi,
When I run the code below, nothing seems to be executed, and no error messages are presented. In my experience it's due to a misplaced ' or " somewhere.. But I can't find anything off.. Can someone with a better set of eyes take a look at it?
Thanks
David
When I run the code below, nothing seems to be executed, and no error messages are presented. In my experience it's due to a misplaced ' or " somewhere.. But I can't find anything off.. Can someone with a better set of eyes take a look at it?
Code: Select all
<?
$link = mysql_connect(localhost,xx,xx) or die (mysql_error());
$db = mysql_select_db(xx,$link) or die (mysql_error());
$result = mysql_query("SELECT * FROM members",$link) or die (mysql_error());
while($row = mysql_fetch_array($result,MYSQL_ASSOC){
$sql = "INSERT INTO members2 (memberid,name,address,city,state,zip,country, email,cardtype,cardnum,cardexp,cardname,username, password,billplan,promocode,lastbilled,entrydate, expiredate,subdate,ccattempt,cardnum_checksum)
VALUES
('$row[memberid]','$row[fname]','$row[address]', '$row[city]','$row[state]','$row[zip]','$row[country]', '$row[email]','$row[cardtype]','$row[cardnum]','$row[cardexp]', $row[username]','$row[password]','$row[billplan]','$row[promocode]', '$row[lastbilled]','$row[entrydate]','$row[expiredate]','$row[subdate]', '$row[ccattempt]','$row[cardnum_checksum]')";
mysql_query($sql,$link) or die (mysql_error());
}
?>David