Re: forms /selects

Поиск
Список
Период
Сортировка
От jco@cornelius-olsen.dk
Тема Re: forms /selects
Дата
Msg-id OFDE05BAC9.342E6EA3-ONC1256C8B.004CC51B@dk
обсуждение исходный текст
Ответ на forms /selects  (angelo.rigo@globo.com)
Ответы Re: forms /selects  (angelo.rigo@globo.com)
Список pgsql-php

I see a couple of errors, one of which is the source of your problem.
You write:
        "SELECT name FROM thetable WHERE (nome=$leter%) ORDER BY nome ASC";
This would evaluate to
        "SELECT name FROM thetable WHERE (nome=A%) ORDER BY nome ASC";

What you need to write is:
        "SELECT name FROM thetable WHERE (nome like '$leter%') ORDER BY nome ASC";

"like" is required to make regular expression match.
The quotes are always required when dealing with strings (and a few other types).

You could have just debugged this by
        echo $query;

Also: Letter contains two t's. :)

Regards
/Jørn Cornelius Olsen

В списке pgsql-php по дате отправления:

Предыдущее
От: jco@cornelius-olsen.dk
Дата:
Сообщение: Re: Large file upload
Следующее
От: Vince Vielhaber
Дата:
Сообщение: Re: Large file upload