adamscottmartin Posted June 11, 2007 Share Posted June 11, 2007 Hi, I have 2 databases: One is called partnumbers and contains a list of part numbers. One is called bluefiles and has entries with the part numbers in the previous table that define file names. So far I have this as a test: A while function that will find every entry in the partnumbers table and print out a nice table with the info. A while function that will find every entry in the bluefiles table and print out a nice table with the info. A search box at the top of the page where you can search the partnumbers database for records (not really important except to note that I already have form handlers somewhat in place for the simple features the search box performs). Basically what I want is this: When a user clicks on a link in the partnumbers table that I print out to the screen, I want it to peform a query to the bluefiles database and print out a table with information specific to that part. For instance if the user clicks a link for the part 'computer xyz' I want it to find all the relevant records in the bluefiles database with that part number. I know how to do this with a query or (in the case of my search box) using form data passed through the $_POST associative array. Is there any way to do this inline with a link? Am I thinking too hard today about a simple issue? Does anyone even understand what I just typed? </brainmeltdown> Thanks to anyone with suggestions, don't know why I am stuck today but I'm a bit of a newb sometimes... Quote Link to comment https://forums.phpfreaks.com/topic/55108-help-making-links-perform-mysql-queries-or-maybe-something-better/ Share on other sites More sharing options...
adamscottmartin Posted June 11, 2007 Author Share Posted June 11, 2007 OK so my brain just got off it's lazy self and figured out an easy way to do this...I knew it would happen but I thought it would take several hours first... Anyways, the easiest way (for my application) would be to make inline forms for each of the partnumbers. Each form would have a hidded field which would pass the data to the $_POST array and a submit button that looks like a file folder or something clever. Then all I have to do is place a few more handlers on this page and voila! Maybe 10 lines of code and I am done. Why did that seem so hard? Quote Link to comment https://forums.phpfreaks.com/topic/55108-help-making-links-perform-mysql-queries-or-maybe-something-better/#findComment-272424 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.