Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2002
    Posts
    1

    Unanswered: how to view a field?

    hi guys,

    I have a db. and a table
    and the fields are

    id title text.

    I enter long texts to my db using a form page. I have no problem with listing my entries... What I want to do is to view the text of a specific entry.

    Suppose that, list.php lists my entries.
    I want to write a script that views the text of a specific entry
    sth like

    view.php?id=2

    I want to print the text on the screen But unfortunately I can't succeed...
    I tried to select the "text" field with my sql query but it didn't work

    please help me alittle...

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    what database? mysql? try putting backticks around the text column name

    select id, title, `text`
    from yourtable

    text is a reserved word, see 6.1.2 Database, Table, Index, Column, and Alias Names

    rudy
    http://rudy.ca/

Posting Permissions

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