SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Im a Moron

  1. #1
    SitePoint Addict
    Join Date
    Dec 2001
    Posts
    395
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Im a Moron

    Hi, I have no idea what I'm doing and I have a PHP and MysQL book sitting next to me. I wanted to create a database for my site. My host will create the database for me and then I need to creat the files I guess. I wanted to make a table that features 5 columns. Lets call them name, city, state, age, income.... I want to be able to easily add more names to the database and have them sorted automatically by name. When someone would click on city, I want it to sort alphabetically by city then and so on. Can I do this? Is there a free script for this? I looked at hot scripts and found nothing. If possible I want to make each row a different color. white, gray, white, gray, etc... Any help would be great. Thank you.

  2. #2
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://www.mysql.com/doc/C/r/Creating_tables.html

    http://www.mysql.com/doc/I/N/INSERT.html

    http://www.mysql.com/doc/R/e/Retrieving_data.html

    Count the rows you print out and...
    if $rowcount % 2 is 0 => background color #1
    if $rowcount % 2 is 1 => background color #2
    http://www.php.net/manual/en/languag...arithmetic.php
    Last edited by jofa; Jul 4, 2002 at 15:54.

  3. #3
    SitePoint Addict
    Join Date
    Dec 2001
    Posts
    395
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Isnt there any pre made scripts?


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
  •