hewstone999 Posted January 28, 2009 Share Posted January 28, 2009 Hey guys, I have the code below which inputs data in a database, however instead of inputted the values i want, it inputs the string: Is there someting wrong with $RowName? $ColName = "Col1,Col2,Col3"; $RowName = "'$line[0]','$line[1]','$line[2]'"; $data = file_get_contents($table); $rows = explode("\n", $data); foreach($rows as $row){ $line = explode(',', $row); $SQLCODE = "INSERT INTO TempData($ColName) VALUES($RowName)"; $rS = $db_conn->execute($SQLCODE); } Quote Link to comment Share on other sites More sharing options...
gevans Posted January 28, 2009 Share Posted January 28, 2009 First, after this line; $SQLCODE = "INSERT INTO TempData($ColName) VALUES($RowName)"; add this; die($SQLCODE); Post what prints on screen. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.