#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2011
    Posts
    2
    Rep Power
    0

    Firebird doesn't return row in clause SELECT ... WHERE LIKE


    Hi,
    I have small problem with firebird. I have to get every rows from database where column INDEKS = R539. So I have written this query:
    1. SELECT INDEKS, NAZWA FROM KARTOTEKA WHERE UPPER(NAZWA) LIKE UPPER('%R539%') OR UPPER(INDEKS) LIKE UPPER('%R539%')
    but it doesn't returning row in which INDEX = 'R539'. When I change R539 to R53 row where index = R539 is in result. What is more, when I use FlameRobin or firebirdWebAdmin everything is OK. I have no idea what is wrong.

    Greetings
    kriszna

    P.S. Sorry for my English
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2006
    Location
    Carlsbad, CA
    Posts
    2,057
    Rep Power
    383
    You may need to post the table definition and some sample data (just one or two rows).

    You say it works in FlameRobin and firebirdWebAdmin so what do you mean by
    it does it NOT work?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2011
    Posts
    2
    Rep Power
    0
    Table has 2 columns:
    Name Type Char Set Collate
    INDEKS VARCHAR(13) WIN1250 PXW_PLK PRIMARY
    NAZWA VARCHAR(120) WIN1250 PXW_PLK

    I would say that it doesn't work when I'm using PHP with PDO. I have to show this data on website, so using flameRobin or FirebirdWebAdmin is impossible.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2006
    Location
    Carlsbad, CA
    Posts
    2,057
    Rep Power
    383
    Without wishing to state the obvious, if the SQL works in FlameRobin the problem does not lie in either Firebird or your SQL.

    You need to post your question in a PHP forum and include your PHP code of course.

    Clive

IMN logo majestic logo threadwatch logo seochat tools logo