Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: display query results


  • From: PJ <af(dot)gourmet(at)videotron(dot)ca>
  • To: Andy Shellam <andy(dot)shellam-lists(at)mailnetwork(dot)co(dot)uk>
  • Cc: pgsql-php(at)postgresql(dot)org
  • Subject: Re: display query results
  • Date: Fri, 01 Aug 2008 11:31:58 -0400
  • Message-id: <48932C6E.9030309@videotron.ca> <text/plain>

You were quite right, the problem was a line feed after the word "Alcohol"
Now it works fine.
Thanks, I learned a lot .... :)

Andy Shellam wrote:
Haha, no worries, I've had the same issue before.
It's almost certain that the text in your column does not exactly match "Alcohol" for one of a few reasons, e.g.

"Alcohol " (right-padding)
" Alcohol" (left-padding)
" Alcohol " (padded both sides)

will not match = 'Alcohol' in the query.
Try trimming the data in that field - from PgAdmin or some other query tool, run something like:

|UPDATE glossary_item SET "name" = |trim(both ' ' from "name")




Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group