codingbenn Posted November 20, 2012 Share Posted November 20, 2012 well I have a mysql with 3 columns which are called ID, firstName, lastName. I want to search for a name and it then return the ID? thanks little bit of the database; ID firstName lastName 100033 Stijn Stijnen 1001 Gábor Király 100143 Frederik Boi 100264 Tomasz Szewczuk 100325 Steeve Joseph-Reinette 100326 Kamel Chafni 100329 Abdoulaye Faye 100330 José Saez 100387 Richard Spong 100391 Laurent Delorge 100470 Michael Ingham 100521 David Noble 100557 Brian Barry-Murphy 100559 Paul McKenna 100578 Richard Cresswell Link to comment https://forums.phpfreaks.com/topic/270949-search-for-a-name-then-return-a-cell-from-that-rowmysql/ Share on other sites More sharing options...
Pikachu2000 Posted November 20, 2012 Share Posted November 20, 2012 SELECT your_id_field FROM your_table WHERE your_first_name_field = 'first_name' AND your_last_name_field = 'last_name' Link to comment https://forums.phpfreaks.com/topic/270949-search-for-a-name-then-return-a-cell-from-that-rowmysql/#findComment-1393868 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.