r!\n\n";}
> echo "End of line";
>
> pg_free_result($result);
> pg_close($dbconn);
> ?>
>
> -Original Message-
> From: Scott Marlowe [mailto:scott.marl...@gmail.com]
> Sent: Friday, January 02, 2009 10:28 AM
> To: iog...@free.fr
> Cc: Marc Fromm; pg
Marc Fromm wrote:
This is my code:
You should probably be using code that looks like this:
$query = "select first_name, last_name, alert from alert_list where w_number='" .
pg_escape_string($w_number) . "'"
Otherwise you're vulnerable to SQL Injection attacks.. For example, what
happens
l...@gmail.com]
Sent: Friday, January 02, 2009 10:28 AM
To: iog...@free.fr
Cc: Marc Fromm; pgsql-admin@postgresql.org
Subject: Re: [ADMIN] access data in php
On Fri, Jan 2, 2009 at 11:09 AM, wrote:
> pg_fetch_assoc behave like pg_fetch_array: it increments the internal
> pointer to the
My results are missing the first record as you explained.
-Original Message-
From: iog...@free.fr [mailto:iog...@free.fr]
Sent: Friday, January 02, 2009 10:09 AM
To: Marc Fromm
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] access data in php
On Fri, 2 Jan 2009, Marc Fromm wrote
On Fri, Jan 2, 2009 at 11:09 AM, wrote:
> pg_fetch_assoc behave like pg_fetch_array: it increments the internal
> pointer to the current result.
> So if you call it once, then pg_fetch_array will return the 2nd result in
> the result set.
Wow, I'm so used to seeing
$rows = pg_num_rows() that th
On Fri, 2 Jan 2009, Marc Fromm wrote:
If I gather the sql results with this code
$results = pg_query($dbconn,$query);
I can check if there is no returned data with this code
$rows = pg_fetch_assoc($result);
but if I then use a while loop to display data (if there is data returned) with
th
On Fri, Jan 2, 2009 at 10:11 AM, Marc Fromm wrote:
> If I gather the sql results with this code
> $results = pg_query($dbconn,$query);
>
> I can check if there is no returned data with this code
> $rows = pg_fetch_assoc($result);
>
> but if I then use a while loop to display data (if there is data
If I gather the sql results with this code
$results = pg_query($dbconn,$query);
I can check if there is no returned data with this code
$rows = pg_fetch_assoc($result);
but if I then use a while loop to display data (if there is data returned) with
this code
while ($row = pg_fetch_array($result)