jdock1 Posted October 18, 2010 Share Posted October 18, 2010 Say a user puts in a support request, and for every request it generates a unqiue string, and enters it into the database. Ok, now say there is a text field, when the user enters their unique string and it finds a match, it displays the data along with it. How can I accomplish this? Im kind of new to mysql, but I know basic SQL. Would be great if somebody could point me in the right direction! Thanks Link to comment https://forums.phpfreaks.com/topic/216120-how-to-search-mysql-database-and-display-results-according-to-query/ Share on other sites More sharing options...
BlueSkyIS Posted October 18, 2010 Share Posted October 18, 2010 that is a large question and you don't mention your PHP experience, so I assume you are starting from step 0. here is a tutorial: http://www.freewebmasterhelp.com/tutorials/phpmysql Link to comment https://forums.phpfreaks.com/topic/216120-how-to-search-mysql-database-and-display-results-according-to-query/#findComment-1123156 Share on other sites More sharing options...
jdock1 Posted October 18, 2010 Author Share Posted October 18, 2010 No.. I no all of that, I just dont know the SQL to use a search with mysql and displaying a row of data by entering the ID which is a value in the row. Say there are two rows, request_id & msg. The request ID is 28fj3k2. I enter that into a text field, I want to display the other value in the row of that table in the database. I jsut do not know the correct query for that. Anybody? Link to comment https://forums.phpfreaks.com/topic/216120-how-to-search-mysql-database-and-display-results-according-to-query/#findComment-1123305 Share on other sites More sharing options...
jdock1 Posted October 18, 2010 Author Share Posted October 18, 2010 Sorry, I meant in one row there are two values request_id and msg Link to comment https://forums.phpfreaks.com/topic/216120-how-to-search-mysql-database-and-display-results-according-to-query/#findComment-1123308 Share on other sites More sharing options...
Buddski Posted October 18, 2010 Share Posted October 18, 2010 SELECT `msg` FROM `table` WHERE `request_id` = '28fj3k2' Might be what you are after. Link to comment https://forums.phpfreaks.com/topic/216120-how-to-search-mysql-database-and-display-results-according-to-query/#findComment-1123310 Share on other sites More sharing options...
jdock1 Posted October 18, 2010 Author Share Posted October 18, 2010 SELECT `msg` FROM `table` WHERE `request_id` = '28fj3k2' Might be what you are after. thanks bud!!!!! Link to comment https://forums.phpfreaks.com/topic/216120-how-to-search-mysql-database-and-display-results-according-to-query/#findComment-1123611 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.