Jump to content

Recommended Posts

Hmmmm, not sure what you are getting at. Since you have data in the database, I would think that the band profile pages would be created dynamically.

 

So, you would first want to create the viewProfile page which would use a variable on the query string to determine the id of the band who's profile is to be displayed. Then if you had a page where you wanted to link to all the bands' profile pages you just create links int he format

 

http: //mydomain.com?bandid=nn (where nn is the band id).

You are not providing any relevant information. I gave you a general idea on how it could be accomplished. But, I have no knowledge over how your current setup is.

 

Are the band profile pages static or created dynamicall. If they are static, you need to create a column in the band table to specify their profile page. If they are dynamic please specify the format of the URL to access the band profile pages.

 

Then, you also need to post the code you have to create the page above and we can help you further.

i havent built the band pages yet, but they will be made to an adress like www.mydomain.com/bandone.php

 

at the moment i have one mysql database for voting with rateid, bandid and rating

 

 

at the moment the bandid is litterally just what i type in, i suppose i want it so the band id is relevant to their profile page, so for exaple

 

band ones profile page has all their information on it and an option to vote for them, if you for them their rating goes up 1, the ratings are viewable on their own page which will be something like www.mydomain.com/chart.php

 

i want the chart to know who band one is and have an available link back to their profile page. im new at php and mysql so this is how i have to explain in order to not confuse myself! i cant show u any band profiles cos i havent built them yet because i need to figure this out first!

 

the only thing ive built so far is a mysql database with those rows, a button that you can vote with and voting result page

You need to take a step back. It seems you create a table for voting, but haven't created any of the other tables yet. The voting table would be the least important.

 

IMHO, You need to start be deciding on all of the information you plan to collect - then create your database design.

 

Now, on the band profile pages if the layout of all the pages will be the same (i.e. band name, genre of band, albums of the band, etc.) then all this information should be stored in the database and you should display the pages dynamically - i.e. get the data from the db and build the page with that data.

 

If the pages will be significantly different, you can either build static pages for each OR store all of the page content in the database. i would definitely try to use a solution where the data is in the database as it creates less work going forward.

 

Ok, so let's assume you will have static pages (not my preference). Then you will still need a table for the band data - band name, id, etc, and the profile page. Then when you do a query for the votes you would also grab the profile page. Something like this:

 

SELECT COUNT(v.votes), b.band_name, b.profile_page

FROM votes v

LEFT JOIN bands b ON v.bandid = b.bandid

GROUP BY v.votes

 

But, if you were to use dynamic pages for the profiles, then you would do the same as above, but you would add the bandid to the list of fields to get instead of profile_page.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.