pixeltrace Posted June 22, 2007 Share Posted June 22, 2007 guys, i need help, i usually uploads csv to our database and currently this is my code LOAD DATA INFILE 'test_users.csv' INTO TABLE test FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\n' (id, name, username, email, md5(password), usertype, block, sendEmail, gid, registerDate, lastvisitDate, activation, params); this one is working if i replaced md5(password) with just password my problem now, i need the password to be in md5 format. what is the correct code for this? thanks! Link to comment https://forums.phpfreaks.com/topic/56642-need-help-on-load-data-infile/ Share on other sites More sharing options...
bubblegum.anarchy Posted June 22, 2007 Share Posted June 22, 2007 What exactly is not working? Link to comment https://forums.phpfreaks.com/topic/56642-need-help-on-load-data-infile/#findComment-279817 Share on other sites More sharing options...
pixeltrace Posted June 22, 2007 Author Share Posted June 22, 2007 on the md5(password) if i change it to password it can be imported successfully however the password is not converted to md5 what is the correct code for this? thanks! Link to comment https://forums.phpfreaks.com/topic/56642-need-help-on-load-data-infile/#findComment-280061 Share on other sites More sharing options...
Illusion Posted June 22, 2007 Share Posted June 22, 2007 Use UPDATE statement to use md5() function on password column once the file was loaded. Link to comment https://forums.phpfreaks.com/topic/56642-need-help-on-load-data-infile/#findComment-280087 Share on other sites More sharing options...
pixeltrace Posted June 22, 2007 Author Share Posted June 22, 2007 hi, is there no other way? because this is what i do after loading. thanks! Link to comment https://forums.phpfreaks.com/topic/56642-need-help-on-load-data-infile/#findComment-280134 Share on other sites More sharing options...
bubblegum.anarchy Posted June 22, 2007 Share Posted June 22, 2007 I mean - what error do you get when using md5() ? Link to comment https://forums.phpfreaks.com/topic/56642-need-help-on-load-data-infile/#findComment-280527 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.