View Full Version : php/mysql Q...but it's really not a mac question...
jvaska
Oct 13, 2002, 02:46 PM
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
Choppaface
Oct 15, 2002, 12:38 AM
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
Rower_CPU
Oct 15, 2002, 11:47 AM
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.
Thirteenva
Oct 15, 2002, 12:08 PM
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.
jvaska
Oct 15, 2002, 01:52 PM
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
Thirteenva
Oct 15, 2002, 02:10 PM
glad to be of help.....
oh, and static sites have their place, not every client needs a dynamic site. I enjoy building both.
jvaska
Oct 15, 2002, 02:22 PM
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
Choppaface
Oct 15, 2002, 06:31 PM
static is fun, just use some flash to make it more enjoyable :D
Rower_CPU
Oct 15, 2002, 07:15 PM
Originally posted by Choppaface
static is fun, just use some flash to make it more enjoyable :D
...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?
Choppaface
Oct 15, 2002, 09:25 PM
Originally posted by Rower_CPU
Bringing this back on topic, who has integrated Flash and a database, and what was your experience like?
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
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.