0

Hi,

I am working on a test site locally. I am loading an xml file into my database with teh following sql query:

LOAD XML LOCAL INFILE 'C:/courseInfo18.xml' 
INTO TABLE wp_courses ROWS IDENTIFIED BY '<Course>' (ReferenceNo, ProviderCode, ProviderName, CourseID, CourseName, 
    CourseTypeID, CourseTypeName, LocationCode, LocationName, StartDate, 
    FinishDate) ;

It works fine locally but not on the live site. I have checked the MySQL version of the live site and it is running only 5.0.8 could this be the reason or does anyone know if there is an alterative way to do this on an older version of MySQL.

Thanks in advance,

Donna :)

Edited by donz365

3
Contributors
4
Replies
20
Views
2 Years
Discussion Span
Last Post by DaveAmour
0

This probably won't help and will only annoy you but always develop with the versions you are deploying to!

0

Hi,

you need at least MySQL 5.1.5 to import XML, otherwise you have to check if a UDF (user defined function) was developed to support old versions. In the documentation you can find a comment (bottom of the page) that suggests a workaround, sincerly I wouldn't use it. If possible instead try to upgrade the database:

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.