SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: MySQL

  1. #1
    SitePoint Member
    Join Date
    Feb 2003
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySQL

    Why I can't see the ID numbers in AID column in mysql , just appear NULL
    I created the table

    CREATE TABLE Jokes (
    ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
    JokeText TEXT,
    JokeDate DATE NOT NULL,
    AID INT
    );

    Then I dit so:
    SELECT LEFT(JokeText,20), AID FROM Jokes;

    It suppostly show the numbers like 1,2,3 in the column AID but I just see NULL

    Please can sombary help me thank's

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,017
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    try selecting ID instead of AID, and you will see the numbers



    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Member
    Join Date
    Feb 2003
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It work fine but look at here is diferent type

    http://www.mysql.de/articles/ddws/29.html

    see the column AID is numeric.

    Saludos

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,017
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    ah, now i understand

    your AID values are NULL probably because you did not put any values into them

    what were the INSERT statements you used to insert rows into the Jokes table?


    rudy


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
  •