PeterPine Posted June 20, 2008 Share Posted June 20, 2008 Hello everyone im new to forums =) I have spent so much time trying to find a solution for my problem, but i cannot find it anywhere.. Im looking for a simple code that will enable me to search string from MySql database All i want is a search box with submit button and whenever user enters in a part number it will return with Part number as well as QTY that is in stock. Is there a easy way of doing this, im novice in PHP and MySQL, any help would be greatly appreciated. -Peter Link to comment https://forums.phpfreaks.com/topic/111047-please-help/ Share on other sites More sharing options...
DarkWater Posted June 20, 2008 Share Posted June 20, 2008 There's tons of responses to that search on Google, but whatever. You'll want to use a WHERE clause to do it. For example: SELECT * FROM products WHERE partnum=$partnum; Link to comment https://forums.phpfreaks.com/topic/111047-please-help/#findComment-569845 Share on other sites More sharing options...
PeterPine Posted June 20, 2008 Author Share Posted June 20, 2008 Thank you for quick reply, I have searched google, and all of the examples provided, i either could not figure out or they were spitting out blank pages.. could you write me a small example im willing to donate $$ if i have working model -Peter Link to comment https://forums.phpfreaks.com/topic/111047-please-help/#findComment-569849 Share on other sites More sharing options...
bluejay002 Posted June 20, 2008 Share Posted June 20, 2008 now that's odd? that should be very plenty... am wondering how you searched? yep, as DarkWater said, you need WHERE in your query (MySQL)... you need a input text field (HTML)... and you need PHP to fetch the data from the form input, send it to MySQL in a form of a query, parse the result (PHP) and display it... use a table/div for output (HTML) that's the logic on how to do it i suppose. Link to comment https://forums.phpfreaks.com/topic/111047-please-help/#findComment-569850 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.