Jump to content

Can Not Perform Load Command


yangkai9999

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...