php/mysql Q...but it's really not a mac question...

Discussion in 'Mac Help/Tips' started by jvaska, Oct 13, 2002.

  1. jvaska macrumors 6502

    Joined:
    Feb 18, 2002
    Location:
    Haiti/NYC
    #1
    ok...maybe this will get deleted...or not...i don't know...

    i'm making my own basic blog...using php/mysql...most blogs are horrible to look at...and i can't have that...

    but i've never tried to use two database tables at the same time...one holds all of the blog contents...the other holds response data which requires a form to input the data and also a loop/array (is this what it's called?) to retreive the response information and display it on the page...

    it's very compacted as all of these pieces are on only one page (per each blog entry)...

    so...does anybody know of a good resource about using multiple tables? i've been searching and searching...haven't found much...

    this is where it is so far...just a sketch as i'm trying to figure out how to do the php part of things -> http://blog.tatiret.com/index.php?blog=1

    help is appreciated...and if some nice dev wants to really help me out i'll kick down a little graphic work for them in exchange...jv
     
  2. Choppaface macrumors 65816

    Joined:
    Jan 22, 2002
    Location:
    SFBA
    #2
    dunno what you're trying to do, but it's easy to select different things with different tables, just use the right SELECT syntax. you might want to get phpmyadmin to play around with select statements....also php.net for the mysql functions
     
  3. Rower_CPU Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #3
    Another option might be to use include/require to assemble your page. For example:

    Include the blog and feedback sections as separate files that way each file can talk to a different database/table.
     
  4. Thirteenva macrumors 6502a

    Joined:
    Jul 18, 2002
    #4
    go to mysql.com

    you need to use a "JOIN" on your tables in the query.

    Most of the time an inner join will work just fine. Make sure you've defined your primary keys for each table.
     
  5. jvaska thread starter macrumors 6502

    Joined:
    Feb 18, 2002
    Location:
    Haiti/NYC
    #5
    hey thanks for the comments...

    well...i've accomplished everything i set out to do...i'm pretty psyched...a hard weekend a day of studying taught me quite alot...

    i never did find a tutorial thought about using multiple tables...probably because it was so easy...

    i'm feeling relatively dangerous with php now...i'm NEVER going to build a static website for my clients...never...they're gonna get dynamic or i'm not going to work for them...

    and...having php and mysql inside of my osx'ified mac made for a very painless dev environment...now i need to upgrade from the 19" monitor to a 23" display...or better yet...two of them...hehe...

    jv
     
  6. Thirteenva macrumors 6502a

    Joined:
    Jul 18, 2002
    #6
    glad to be of help.....


    oh, and static sites have their place, not every client needs a dynamic site. I enjoy building both.
     
  7. jvaska thread starter macrumors 6502

    Joined:
    Feb 18, 2002
    Location:
    Haiti/NYC
    #7
    well yeah...i'm probably over doing it actually...

    but when you build a static site i bet you still make a liberal use of simple server-side includes...??? i generally do...

    i've dabbled with asp and php, but never like i did this weekend...it was much fun...jv
     
  8. Choppaface macrumors 65816

    Joined:
    Jan 22, 2002
    Location:
    SFBA
    #8
    static is fun, just use some flash to make it more enjoyable :D
     
  9. Rower_CPU Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #9
    ...and less accessible...:mad:

    I'm glad to see some more accessibility options on MX/6...but it's still a far cry from a complete package.

    Bringing this back on topic, who has integrated Flash and a database, and what was your experience like?
     
  10. Choppaface macrumors 65816

    Joined:
    Jan 22, 2002
    Location:
    SFBA
    #10
    there are some 'drawing boards' (I think flashguru had one..) and other things like mini-chatrooms that use an xml server of some sort...not really a database though

    you can also send database stuff to your flash movie formatted in xml via php script
     

Share This Page