Re: [GENERAL] [OT] Postgresql and PHP

Поиск
Список
Период
Сортировка
От Alessandro Baggi
Тема Re: [GENERAL] [OT] Postgresql and PHP
Дата
Msg-id 584cea60-da0b-80a1-3574-4ba525765d56@gmail.com
обсуждение исходный текст
Ответ на Re: [GENERAL] [OT] Postgresql and PHP  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: [GENERAL] [OT] Postgresql and PHP
Re: [GENERAL] [OT] Postgresql and PHP
Список pgsql-general
Il 23/12/2016 16:52, David G. Johnston ha scritto:
> On Fri, Dec 23, 2016 at 8:44 AM, Alessandro Baggi
> <alessandro.baggi@gmail.com <mailto:alessandro.baggi@gmail.com>>wrote:
>
>     $query = pg_query_params($dbcon, "SELECT count(*) from bs_ipsource
>     where srcaddr = $1", array($ipsrc));
>     if(!$query) { print error...}
>
>     I don't understand why this query fails without error. I have
>     searched error in httpd logs and postgresql log without success.
>
>     from postgresql logs i get:
>
>     LOG:  execute <unnamed>: SELECT count(*) from bs_ipsource where
>     srcaddr = $1
>     DETAIL:  parameters: $1 = '192.168.1.1'
>
>
> ​You might wish to explain how you've defined "fail" since there is no
> actual error.
>
> One common explanation is that the database psql is talking to, which
> has the relevant data, is not the same database that PHP is talking to,
> and which lacks matching data.
>
> You might want to fire off one or more "host machine identification"​
> queries in both just to confirm whether this is the case.
>
> David J.
>

Hi David,
thanks for your answer.
I don't think that this is the problem.
Before the reported query I've other queries to the same db on other
tables and works without problem.

Then I've only this db and only this host.






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

Предыдущее
От: Alessandro Baggi
Дата:
Сообщение: Re: [GENERAL] [OT] Postgresql and PHP
Следующее
От: nomad@null.net
Дата:
Сообщение: Re: [GENERAL] Bug? Netmask of CIDR as TEXT has trailing masklen