Jump to content

Can Not Perform Load Command


yangkai9999
 Share

Recommended Posts

Hello,this is the part of my PHP code. the goal of the code are delete all existing records from p3_new table and load the new records into the table.the problem is: the delete part works well, but the load part isn't.Could you please point out where is the problem and how to fix it?Thank you,code://delete all records from p3_new;$deleterecords = "TRUNCATE TABLE p3_new"; mysql_query($deleterecords);//load new records into p3_new table;$LOADD= "LOAD DATA LOCAL INFILE \"C:\\wamp\\www\\MyTest2\\ex_file\\$csvfile\" INTO TABLE mytest.p3_newFIELDS TERMINATED BY \",\" ENCLOSED BY '\"' ESCAPED BY \"\\\" LINES TERMINATED BY \"\r\n\"IGNORE 1 LINES (study_id,family_id,date_visit,wbc,hgb_g_dl,hct_pctg,plt,na,k,cl,co2,Glucose,bun,cr,gfr,hdl,ldl,chol,trigl,hga1c,ma_cr,Comments);";//echo "$LOADD";mysql_query($LOADD);

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...