webbyhull Posted June 5, 2007 Share Posted June 5, 2007 hi there, i was wondering if someone could help me out i have just installed joomla and i need to auto sync the user table from my excisting custom table. i can just do an export import but that takes time, is there anyway of making this auto sync? also the password field isnt encrypted on my custom userlist but it needs to convert to md5 for the joomla table any help would be appriciated cheers in advnace Quote Link to comment https://forums.phpfreaks.com/topic/54270-mysql-auto-sync-tables/ Share on other sites More sharing options...
Wildbug Posted June 5, 2007 Share Posted June 5, 2007 You can write a INSERT INTO ... SELECT query. You have a user table of your own, and you want to use some of that data to populate a table from another user-based application, right? INSERT INTO joomla (col1,col2,etc) SELECT username,MD5(password),blah,blah FROM myuserlist; Of course, you'll need to figure out the columns, etc. Quote Link to comment https://forums.phpfreaks.com/topic/54270-mysql-auto-sync-tables/#findComment-268536 Share on other sites More sharing options...
gogetwise Posted June 9, 2007 Share Posted June 9, 2007 ok to add to this what if the field names where different, so say, in the joomla table its called jos_users but in the custom table its username Quote Link to comment https://forums.phpfreaks.com/topic/54270-mysql-auto-sync-tables/#findComment-271325 Share on other sites More sharing options...
Wildbug Posted June 11, 2007 Share Posted June 11, 2007 It doesn't matter what the column names are. You can name the columns to be filled in the "(col1,col2,etc)" list, and the data in the columns that are returned are placed in those columns based on the order they appear in the query, not by their name. Obviously, there needs to be the same number of columns in either the target table or the column list and the query. Quote Link to comment https://forums.phpfreaks.com/topic/54270-mysql-auto-sync-tables/#findComment-272282 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.