Jump to content

hendoyeah

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

hendoyeah's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi all Trying to do a count joining a couple of tables. |---------------| | user_library    | |---------------| |userid            | |ablbumid        | |---------------| |---------------| |artists            | |---------------| |artistid            | |artist_name      | |---------------| |---------------| | albums          | |---------------| |albumid          | |artistid            | |ablbum_name  | |---------------| Want to return a query listing all albums a user has according to the "user_library" table, including the fields albmum_name, artist_name. That part is easy. However i also want to include a count field for each row showing the number of albums a user has by that particular artist. Something like: |--------------------------------------------------------------------------------| |  userid  |  album_name  |  artist_name  |  albums_by_this_artist_in_this_query      | |--------------------------------------------------------------------------------| |  1      | Album1      |  Artist1      |  2                                                          | |--------------------------------------------------------------------------------| |  1      | Album2      |  Artist1      |  2                                                          | |--------------------------------------------------------------------------------| |  1      | Album3      |  Artist2      |  1                                                            | |--------------------------------------------------------------------------------| I'm sure its simple, but i've never done this. thank you.
  2. thanx all for your suggestions. the following code alters the header of a page and forces a download of an mp3. My question is, is there any way for a user to figure out the original path of the mp3 when downloading using this method? [quote] $filelocation = "path-to-mp3/the-mp3-file.mp3"; header('HTTP/1.1 200 OK'); header('Date: ' . date("D M j G:i:s T Y")); header('Last-Modified: ' . date("D M j G:i:s T Y")); header("Content-Type: application/force-download"); header("Content-Lenght: " . (string)(filesize($filelocation))); header("Content-Transfer-Encoding: Binary"); header("Content-Disposition: attachment; filename=".str_replace(" ", "", basename($filelocation)).""); readfile($filelocation); echo($filelocation); [/quote]
  3. Hi all, I'm a new asp > php convert and still working out what php is capable of. I'm building a site which allows users to subscribe to mp3's. I'm not quite sure how to go about the security side of things, i.e. only allowing users who to have access to the mp3's they have subscribed to after they have logged in (php handled). Knowing i will be on a shared host with cpanel, can someone tell me the most efficient way of achieving this? Maybe this is an apache question also??? thanx nathan
×
×
  • 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.