Home Forums General Discussions Open Topic PHP / MySQL Help

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #46067

    rd
    Participant

    I’m working on redoing my Dinosaur Jr/ J Mascis discography page (for the 2 people that actually checked it out). Anyway, I want to do it using PHP and MySQL. I’ve gone through the RecordStorePHP tutorial, which I downloaded off of the Macromedia page, and got it to work for the most part and would like to do basically the same for my discography page. But my problem it that I don’t know how to create the database records and files. So could someone tell me or lead me to a tutorial or webpage on how to go about creating the records to used along with PHP for my website. Do I use a part of mysql that I am too stupid to find, or do I use MS Access, or what? Thanks

    #93836

    Anthony
    Participant

    if you look closely, you will see that the record store tutorial and freesofree.net are one and the same. (sssshhh.)

    phpMyAdmin is great for working with mysql. i would get that first and learn how to create new tables and such.

    i’ll get back to you on more a little later.
    cobra verde last night and one too many rum and cokes, i can’t focus on the screen too much.

    #93837

    Anthony
    Participant

    this is how to install apache web server with php and mysql support on windows:

    get the four files here:
    ftp://ftp.freesofree.net/incoming/”>ftp://ftp.freesofree.net/incoming/
    save them somewhere.

    they are not the latest releases, but are stable and i have had them all working on windows before.

    install apache 1.3.27:
    (just double-click the apache .msi file).
    you can use the default setup path (c:program filesapache…)

    DONE.

    extract the php zip to C:PHP
    copy php4ts.dll to windowssystem32 or winntsystem32 directory.
    copy the 13 files from phpdlls to windowssystem32.
    (you may not really need these 13 files in there, im not really sure).
    copy php.ini-dist to windows or winnt and rename it to php.ini
    open php.ini with notepad
    find: extension_dir
    replace ./ with C:PHP
    save php.ini and close.
    copy php4apache.dll from the sapi folder to c:winntsystem32 or c:windowssystem32.

    (now i am not 100% certain as to the correct location of php4apache.dll. it either goes to the system32 or as you will see in the next step, apache calls it from the sapi folder in c:php.
    having it in both locations doesnt hurt.)

    Start > Programs > Apache HTTP Server > Configure Apache Server > Edit httpd.conf.
    find the list of LoadModule
    at the end add:
    LoadModule php4_module c:/php/sapi/php4apache.dll

    find the list of AddModule
    at the end add:
    AddModule mod_php4.c
    AddType application/x-httpd-php .php

    find: <IfModule>
    DirectoryIndex index.html
    </IfModule>

    after index.html add index.php
    so it looks like this: index.html index.php
    save and close httpd.conf
    Start > Programs > Apache HTTP Server > Control Apache Server > Restart.

    if no errors show you are cool.

    open notepad
    create file test.php and add:
    <php>
    save to htdocs
    bring up browser http://localhost/test.php”>http://localhost/test.php
    bam php works.

    extract mysql .zip to a temp location and click setup.exe
    install complete to C:MYSQL
    go to C:MYSQLbin and double-click winmysqladmin.exe
    put in a username and password.
    (note: this is the mysql "head cheese" account. the big boss with access to all databases on the server). use root, or admin, or really whatever you want.

    go to control panel, admin tools, services.
    right-click mysql and restart.

    MySQL DONE.

    extract phpMyAdmin .zip to htdocs
    rename to phpMyAdmin
    open config.inc.php with wordpad
    find: $cfg
    put the path to phpmyadmin in.
    my computer name is: solo
    so my path is ‘http://solo/phpMyAdmin/&#8217;
    scroll down a bit and find: $cfg[$i]
    change to ‘http’
    put the user and pass from winmysqladmin in there as well.
    root and the pass
    save and close

    open browser to http://servername/phpMyAdmin/”>http://servername/phpMyAdmin/
    servername could also be localhost
    for user put in root
    and NO password

    You should see Welcom to phpMyAdmin 2.4.0
    and some red warning text at the bottom.
    Hit privileges
    edit both root users and put password you used for MySQL.
    Hit Home (on the left pane) and it will make you log in. use root and the password you just specified.
    you can now create a new database you will use for your dino site and create a user and give him full access to only the database you just created.
    log out of phpMyAdmin and log back in with the new user you created.
    pow. you are done.
    you will see some red errors in phpMyAdmin about the PMA database. follow the help and do what it says for some added features.

    once you have a database created you can import table structure right from phpMYAdmin.

    this is the db structure for freesofree.net (well some of it)

    CREATE TABLE mp3_album (
    AlbumID int(11) NOT NULL auto_increment,
    AlbumName varchar(100) default NULL,
    ArtistID int(11) NOT NULL default ‘0’,
    AlbumNotes text,
    AlbumCatalogNumber int(11) default ‘0’,
    AlbumAvailable tinyint(3) unsigned default NULL,
    AlbumCoverURL varchar(100) default NULL,
    AlbumCoverThumbnailURL varchar(100) default NULL,
    AlbumButton varchar(100) default NULL,
    Track01 varchar(255) default NULL,
    Track01URL varchar(255) default NULL,
    Track02 varchar(255) default NULL,
    Track02URL varchar(255) default NULL,
    Track03 varchar(255) default NULL,
    Track03URL varchar(255) default NULL,
    Track04 varchar(255) default NULL,
    Track04URL varchar(255) default NULL,
    Track05 varchar(255) default NULL,
    Track05URL varchar(255) default NULL,
    Track06 varchar(255) default NULL,
    Track06URL varchar(255) default NULL,
    Track07 varchar(255) default NULL,
    Track07URL varchar(255) default NULL,
    Track08 varchar(255) default NULL,
    Track08URL varchar(255) default NULL,
    Track09 varchar(255) default NULL,
    Track09URL varchar(255) default NULL,
    Track10 varchar(255) default NULL,
    Track10URL varchar(255) default NULL,
    Track11 varchar(255) default NULL,
    Track11URL varchar(255) default NULL,
    Track12 varchar(255) default NULL,
    Track12URL varchar(255) default NULL,
    Track13 varchar(255) default NULL,
    Track13URL varchar(255) default NULL,
    Track14 varchar(255) default NULL,
    Track14URL varchar(255) default NULL,
    Track15 varchar(255) default NULL,
    Track15URL varchar(255) default NULL,
    Track16 varchar(255) default NULL,
    Track16URL varchar(255) default NULL,
    Track17 varchar(255) default NULL,
    Track17URL varchar(255) default NULL,
    Track18 varchar(255) default NULL,
    Track18URL varchar(255) default NULL,
    Track19 varchar(255) default NULL,
    Track19URL varchar(255) default NULL,
    Track20 varchar(255) default NULL,
    Track20URL varchar(255) default NULL,
    Track21 varchar(255) default NULL,
    Track21URL varchar(255) default NULL,
    Track22 varchar(255) default NULL,
    Track22URL varchar(255) default NULL,
    Track23 varchar(255) default NULL,
    Track23URL varchar(255) default NULL,
    Track24 varchar(255) default NULL,
    Track24URL varchar(255) default NULL,
    Track25 varchar(255) default NULL,
    Track25URL varchar(255) default NULL,
    PRIMARY KEY (AlbumID),
    KEY AlbumID (AlbumID),
    KEY ArtistID (ArtistID)
    ) TYPE=InnoDB;

    #
    # Table structure for table `mp3_artist`
    #

    CREATE TABLE mp3_artist (
    ArtistID int(11) NOT NULL auto_increment,
    ArtistGroupName varchar(100) default NULL,
    ArtistStyle varchar(50) default NULL,
    ArtistNames varchar(100) default NULL,
    ArtistPhoto varchar(100) default NULL,
    PRIMARY KEY (ArtistID),
    KEY ArtistID (ArtistID)
    ) TYPE=InnoDB;

    mp3_album stores all of the bootlegs.
    mp3_artist stores the artists :)

    use dreamweaver, create a new site, using php/mysql, and follow the recordstore tutorial.

    i typed this in as i did an install on my laptop. if you find any errors, let me know and i’ll check it out.
    good luck!

    #93838

    rd
    Participant

    Thanks!!! I haven’t had time yet to go step by step with your instructions. If I have any problms I’ll let you know. Thanks again.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.