funstein Posted September 23, 2010 Share Posted September 23, 2010 Hi everyone, I am working on a website that involves MySQL. Here is the example to my table. field1 | field2 George Fritz | www.fritz.org Linda Gomez | www.gomez.org I need a code, that will fetch field2 of the given field1. For example, if $field1 is George Fritz, the code should return www.fritz.org Any help? Thanks... Funstein Link to comment https://forums.phpfreaks.com/topic/214200-match-mysql-fields/ Share on other sites More sharing options...
Pikachu2000 Posted September 23, 2010 Share Posted September 23, 2010 SELECT `field2` FROM `table_name` WHERE `field1` = 'George Fritz' Link to comment https://forums.phpfreaks.com/topic/214200-match-mysql-fields/#findComment-1114538 Share on other sites More sharing options...
funstein Posted September 23, 2010 Author Share Posted September 23, 2010 Thanks a lot ! Link to comment https://forums.phpfreaks.com/topic/214200-match-mysql-fields/#findComment-1114540 Share on other sites More sharing options...
Pikachu2000 Posted September 23, 2010 Share Posted September 23, 2010 Got a little ahead of myself, re-read the post above. I had to fix an error . . . Link to comment https://forums.phpfreaks.com/topic/214200-match-mysql-fields/#findComment-1114541 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.