Hi everyone, I'm kevin and new to this forum.. I need some help on my website, i have a list like this bleach naruto saint seiya now just for example, when i click on bleach, i want it to display the information about bleach (the same way i inserted it in my dabatase) on a page.. then when i click on naruto, i want it to display only naruto's information on the same page.. See what i mean? and so on. when i click on saint seiya, it shows only information about saint seiya..etc etc.. is there a way to do that? For some more explanation, i have two tables.. #multimedia mult_id mult_name i.e of mult_name : Bleach, naruto etc! then the second table #multi_file file_id mult_id file_name file_description file_link So basically, file_id is primary and auto increment .. Now i do I proceed if i want to display only bleach info when i click on bleach, and antoher one info when i click on it? i really want to figure this out
Hi irkevin. This is quite straightforward and I'd proceed ike this. When you display your clickable list of names, ensure they are done like so... <a href="yourpage.php?mult_id=N"> where N is your multid. in your page you can then reference the id using $_GET['mult_id'] then you can use that to select the main information... "SELECT * FROM multi_file WHERE mult_id = ".$_GET['mult_id']
im so glad u replied.. i'll try it.. by the way.. if u have msn messenger.. just add me irkevin@hotmail.com
It depends on what you mean by "link"? If you want to combine data from the two tables in one sql command (known in the trade as a "join") then you can like so... SELECT * FROM table1,table2 where table1.commonId = table2.commonId So, for your tables it would be... SELECT * FROM multimedia,multi_file where multimedia.mult_id = multi_file.mult_id You can choose which fields to select from both too... SELECT multi_file.name, multimedia.mult_name FROM multimedia,multi_file where multimedia.mult_id = multi_file.mult_id ...and so on. You'd save a lot of time if you read up on the basics of SQL and PHP before going much further.