Hello,
On Fri, 2016-12-23 at 16:44 +0100, Alessandro Baggi wrote:
> Hi list,
> sorry for this OT.
>
> I have a table on postgresql like this:
>
> id serial not null,
> srcaddr varchar(16) not null
>
> I use this table to store ip address. I've used also inet type butÂ
> changed to see if this so
On 12/23/2016 08:03 AM, Alessandro Baggi wrote:
Il 23/12/2016 16:52, David G. Johnston ha scritto:
On Fri, Dec 23, 2016 at 8:44 AM, Alessandro Baggi
mailto:alessandro.ba...@gmail.com>>wrote:
$query = pg_query_params($dbcon, "SELECT count(*) from bs_ipsource
where srcaddr = $1", array($i
On 12/23/2016 08:03 AM, Alessandro Baggi wrote:
Il 23/12/2016 16:52, David G. Johnston ha scritto:
On Fri, Dec 23, 2016 at 8:44 AM, Alessandro Baggi
mailto:alessandro.ba...@gmail.com>>wrote:
$query = pg_query_params($dbcon, "SELECT count(*) from bs_ipsource
where srcaddr = $1", array($i
Hi Adrian,
And what is the count?
Reported is 1
How do you know it fails?
Really I don't know if it fails but
$query = pg_query_params();
if(!$query)
{
echo pg_last_error($dbcon);
echo "ERROR";
} else {
$row = pg_fetch_assoc($query);
if(!$row)
Il 23/12/2016 16:52, David G. Johnston ha scritto:
On Fri, Dec 23, 2016 at 8:44 AM, Alessandro Baggi
mailto:alessandro.ba...@gmail.com>>wrote:
$query = pg_query_params($dbcon, "SELECT count(*) from bs_ipsource
where srcaddr = $1", array($ipsrc));
if(!$query) { print error...}
I
On 23/12/16 15:44, Alessandro Baggi wrote:
Hi list,
sorry for this OT.
I have a table on postgresql like this:
id serial not null,
srcaddr varchar(16) not null
I use this table to store ip address. I've used also inet type but
changed to see if this solves my problem.
From psql, I run:
selec
On Fri, Dec 23, 2016 at 8:44 AM, Alessandro Baggi <
alessandro.ba...@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 searc
On 12/23/2016 07:44 AM, Alessandro Baggi wrote:
Hi list,
sorry for this OT.
I have a table on postgresql like this:
id serial not null,
srcaddr varchar(16) not null
I use this table to store ip address. I've used also inet type but
changed to see if this solves my problem.
From psql, I run:
Hi list,
sorry for this OT.
I have a table on postgresql like this:
id serial not null,
srcaddr varchar(16) not null
I use this table to store ip address. I've used also inet type but
changed to see if this solves my problem.
From psql, I run:
select count(*) from bs_ipsource where srcaddr