#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    17
    Rep Power
    0
    Ok, in my haste I went and created my database. I got 7 fields in my table's record.

    Now, I when I want my PHP to display the data, I want it to display the last entered
    record first.

    I got a ID field, but, I saw in other posts
    I should really be using a DATA field to perform reverse ordering when displaying records?

    How can I add another field to an existing table?

    Thanks

    ToolJob
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Posts
    12
    Rep Power
    0
    Hi there,

    If you wanna insert a new field, try this:

    alter table abc add newfield varchar(200);

    where abc is the table name and newfield is the name of the field.

    And btw, if you wanna get record in reverse order, why don't you just use select to get records in reverse order?

    select whatever from abc order by whatever desc
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    17
    Rep Power
    0
    I meant DATE field.

    sorry
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    17
    Rep Power
    0
    Billy,

    correct me if wrong..

    alter table abc add newfield varchar(200);

    is the same as,

    alter table "mytable" add "new field" varchar(200); ???


    Ok will try it out

    I really appreciate it!!

    ToolJob

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by billylau:
    Hi there,

    If you wanna insert a new field, try this:

    alter table abc add newfield varchar(200);

    where abc is the table name and newfield is the name of the field.

    And btw, if you wanna get record in reverse order, why don't you just use select to get records in reverse order?

    select whatever from abc order by whatever desc
    [/quote]

Similar Threads

  1. Replies: 2
    Last Post: January 28th, 2004, 07:07 AM
  2. Adding to related tables
    By Corey2004 in forum Database Management
    Replies: 0
    Last Post: January 11th, 2004, 03:28 AM
  3. adding data to 2 tables at the same time
    By bulletz in forum ASP Programming
    Replies: 1
    Last Post: December 29th, 2003, 12:13 AM
  4. adding INPUT form fields by users
    By mis2o in forum PHP Development
    Replies: 6
    Last Post: December 16th, 2003, 11:11 AM
  5. Replies: 1
    Last Post: November 29th, 2003, 01:49 PM

IMN logo majestic logo threadwatch logo seochat tools logo