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 =
On Fri, Jan 2, 2009 at 10:11 AM, Marc Fromm marc.fr...@wwu.edu 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
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
On Fri, Jan 2, 2009 at 11:09 AM, iog...@free.fr 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 =
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:
This is my code:
?php
$dbconn = pg_connect(host=localhost port=5432 user=postgres
dbname=studentalerts);
if(isset($_GET[value])){
$w_number=$_GET[value];
}
//echo $w_number;
$query = select first_name, last_name, alert from alert_list where
w_number='$w_number';
$result =
Marc Fromm wrote:
This is my code:
?php
$dbconn = pg_connect(host=localhost port=5432 user=postgres
dbname=studentalerts);
if(isset($_GET[value])){
$w_number=$_GET[value];
}
//echo $w_number;
$query = select first_name, last_name, alert from alert_list where
w_number='$w_number';
On Fri, Jan 2, 2009 at 12:40 PM, Marc Fromm marc.fr...@wwu.edu wrote:
This is my code:
?php
$dbconn = pg_connect(host=localhost port=5432 user=postgres
dbname=studentalerts);
if(isset($_GET[value])){
$w_number=$_GET[value];
}
You need to scrub user input. use