SitePoint Sponsor

User Tag List

Results 1 to 11 of 11

Thread: PHP and MySQL

  1. #1
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In the article about driving your website using PHP and MySQL it seams that if you have large amounts of information ten it would take ages to actually input data. Does sitepoint use a different type of databse or take a shortcut.

    Is PHP and MySQL a faster option than coding HTML files. I mean by this, will the page load slower or faster. How about if you use multiple SSI on a HTML page. Would the PHP and MySQL solution be a faster loading one.

    Peter

  2. #2
    SitePoint Wizard edshuck's Avatar
    Join Date
    Jul 2000
    Posts
    1,200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Peter

    I use 3 includes for each page. One carries the fonts, one for the top of the page, one for the end and one piece of code generating the middle.

    Some have as many a seven includes.

    It is probably not a good practice to do a lot of nesting. It then is easy to lose track of the code.

    Lets say you have an include that ends the html and make the error of putting this inside a piece of code. Could cause strange problems. Depending on the browser, a real mess.

    So use the include and require like spice, a little can go a long way.

    peace

    Edited by edshuck on 11-24-2000 at 01:45 PM

  3. #3
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One other thing that db-driven sites are used because of its ease of changing stuff. Manage most information from one db instead of a bunch of files.
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy

  4. #4
    SitePoint Wizard edshuck's Avatar
    Join Date
    Jul 2000
    Posts
    1,200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi

    absolutely, and then there is the massive flex with a db like mysql. you can sort on almost anything (almost because there is always an exception). do one to many, many to one or many to many work.

    then there is maintenance, right thru the browser.

    actual work on the db is not rare but not that common either.

    with your own unix server, the php and mysql are free.

    or in my case, the isp throws it in as a part of the basic account. many do include it free.

    Also about the tutorial, it is a complete set of working code and many have started there and modified it to meet their own specific requirements. To me, that is the real genius that Kevin put into the work. it is not theory, it works and it is modifiable.

    peace

    Edited by edshuck on 11-24-2000 at 02:50 PM

  5. #5
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could I use PHP and MySQL to make a site that will have maybe around 2000 pages but keeps them exact same template the whole time..?? At the moment, using SSI is really messy. You need one file to include and the included file.

    I would really like PHP just to insert the pages. Now I know this is in the tutorial, however, Only like 1 or 2 pages need to be dynamic pages, updated all the time. The rest will be modified infrequently. Is there an easier around this that doing what the tutorial says.

    Is there like a version on MySQL where you can make a databse like MS Access, where you visually see information clearly?? It would be so much easier.???

    What is the most powerful web databases, excluding oracle databases.

    I am really thinking of doing the database solution to my site and being very early on in design it would be easy however, MySQL and PHP sound really hard. So, any reccomentaions??

  6. #6
    chown linux:users\ /world Hartmann's Avatar
    Join Date
    Aug 2000
    Location
    Houston, TX, USA
    Posts
    6,455
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Yes that is very possible! You could make the template in a few include files and then include those files in your content pages. The content would then be provided by the database.

    There are numerous visualization tools for MySQL. The most popular one is phpMyAdmin. You can get it at http://www.phpwizard.net. Others are available at http://www.hotscripts.com/PHP/Script...se_Management/

    Hope that helps,

  7. #7
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    petesmc

    To respond to your intial question about Time...If you have a site with 2000 plus pages, then yes it would a lot of time to enter all that manually. But then think about the time you would save in the future. As a programmer (?) your time is much more vaulable than that of say, a secretary. (no meaning other than the obvious)

    You design the initial database and let a secretary (who can type way faster than you) enter the information. Once you have everything entered, then not only does your ste become more efficient, more streamlined and effective, you can then track users, track banners...you getting my point? hehehe
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  8. #8
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    On the point of tracking users, does anyone have a custom made script they wrote them selves, becasue i use LogITPro and is great but it gives to much information and wastes valuable space on the server...???

    Peter

  9. #9
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Another question..

    The links on the Sitepoint artivles page, to goto other pages hae a weird format:

    http://www.webmasterbase.com/article.php?aid=270&pid=9

    would the writer enter this, because it sounds long winded or is it automatic or something???

  10. #10
    SitePoint Enthusiast
    Join Date
    Oct 2000
    Posts
    89
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dnt let mysql and php scare you. If you are web designer and wanna do some developing because you wanna move one step further, just get the grip. Because there will be projects that you will have to use database and a programming language/scripting and I think mysql/php combination is one of the basic combination when compared to others.
    MHO
    Great Dane
    Gokhan ARLI

  11. #11
    SitePoint Wizard edshuck's Avatar
    Join Date
    Jul 2000
    Posts
    1,200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi Peter

    One more point. PHP is a full fledged programming language. It is just that it is geared for the web and is a perfect match with mySQL. But it will also work with other dbs and mySQL will work with other languages.

    This is good stuff. Neither are toys but they are really easy and the folks here will help when you are stuck.

    We all learn something every time a question is ask.

    Also about that data input. My first input was 200 to 250 businesses, addresses and phone numbers.

    I configed my table, typed my data in a special format using winword, checked it closely. and telnet'ed it up. then i loaded it into the db with one command, took a bit of work to get the typing strings right and the command right but . Viola. Instant db.

    Not as big as your 2K pages, but big nonetheless.

    mySQL and any db are like Parahna (those little fish in the Amazon), they work best with little bites. So when you move to the design phase of the dbms, that is a good thing to remember.

    Also Kevin Yank covers the use of semistatic pages. If a page does not change often, he shows how to pull up one for a "snapshot" and then load the snapshot instead of using db time.

    Stick around, we will have you advocating this before the evening is over.

    Every time I have had problems with the code, it has been my doing. This code is probably more tested than any commercial (not open source) product.

    peace



    Edited by edshuck on 11-24-2000 at 11:00 PM


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •