tweakui Posted October 11, 2010 Share Posted October 11, 2010 Hello, This is query in MySQL mysql> LOAD DATA LOCAL INFILE '/var/www/html/numbers.csv' INTO TABLE details FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (number);Query OK, 0 rows affected (0.00 sec) Records: 2200 Deleted: 0 Skipped: 1200 Warnings: 0 Now, I am trying to run the same query in PHP and display the same results.... (i.e. Records, Deleted, Skipped) <?php$db=mysql_connect("localhost", "user", "1234") or die(mysql_error()); $dname="database"; mysql_select_db($dname)or die(mysql_error()); $sqlstatement="LOAD DATA LOCAL INFILE '/var/www/html/numbers.csv' INTO TABLE details FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (number)" ; mysql_query($sqlstatement) or die(mysql_error());; echo "it is done!"; ?> Tried mysql_fetch_array, row but could not get it to work... please help guys Quote Link to comment Share on other sites More sharing options...
ialsoagree Posted October 11, 2010 Share Posted October 11, 2010 See mysql_info(): http://www.php.net/manual/en/function.mysql-info.php Quote Link to comment Share on other sites More sharing options...
tweakui Posted October 11, 2010 Author Share Posted October 11, 2010 Hey thanks , mysql_info():, served the purpose... Best Regards 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.