VPS business hosting starting at $29.95/24/7 premium technical support

Simple joining of data from two different tables on basis of a common key

SELECT a.user_id,a.meta_value,b.user_login FROM `e_usermeta` a,`e_users` b where a.meta_key="phoneno" and a.user_id=b.ID
SELECT a.user_id,a.meta_value,b.user_pass,b.user_login FROM `e_usermeta` a,`e_users` b where a.meta_key="phoneno" and a.user_id=b.ID order by b.user_login
UPDATE `wp_users` a,`tmptable` b SET a.`user_pass`=b.`usp` where a.`user_login`=b.`ulogin`;

Author: Harshvardhan Malpani

PHP Developer based in New Delhi, India. Working as a freelance web developer providing server deployment, website development and maintenance services.

Leave a Reply

Your email address will not be published. Required fields are marked *