ramram Posted November 11, 2006 Share Posted November 11, 2006 Hey guys,I have three fields in mysql. First one is id which is auto increment. second one is the first name and last field is last name.I want to display only one field at the time in php how can I just show id number 5 in a specific page? Link to comment https://forums.phpfreaks.com/topic/26963-select-id-in-mysql/ Share on other sites More sharing options...
Psycho Posted November 11, 2006 Share Posted November 11, 2006 Only one field or only one record? A field would be "firstname", a record would be all fields for a single "row" in the database - in other words, id, firstname & lastname for one person.You can get a single record like this (assuming the ID field is uniqe):SELECT * FROM [i]tablename[/i] WHERE id = '[i]idnumber[/i]' Link to comment https://forums.phpfreaks.com/topic/26963-select-id-in-mysql/#findComment-123292 Share on other sites More sharing options...
ramram Posted November 11, 2006 Author Share Posted November 11, 2006 thanks. Link to comment https://forums.phpfreaks.com/topic/26963-select-id-in-mysql/#findComment-123295 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.