Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > pg_query & $res...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 15784 of 17437
Post > Topic >>

pg_query & $result re-fill

by stefan.schwarzer@[EMAIL PROTECTED] (Stefan Schwarzer) Jun 10, 2008 at 05:33 PM

Hi there,

I used to pass a the $result of a pg_query to a function which detects  
min, max etc.

Now, I inserted before that another query which first queries a set of  
parameters for the selected regions. Only if these parameters are  
fulfilled for each of the regions, the values of the above query shall  
be analyzed. Otherwise, they should be set to "NULL".

Now, as I am sending the ($result) to the function, I wonder if I can  
change the values within the $result; or create a new $result based on  
a couple of PHP-IFs?

Here is how it looks like:



Here is a query to retrieve the values for the selected regions and a  
couple of years:

	$result = pg_query("....");

The "result" looks like this:

	|     1999 |   2000 |  2001 ....
A     |       23    |    24     |    23
B     |      12     |   15      |  18
C ....


Here is a query which load a couple of parameters:

	$result_params = pg_query("....");


Here I would like to check:
	
	IF param1 < 75 THEN region-in-$result-should-be-set-to-NULL


This is the call to the function:

	$values = $h -> getValues($result, $selectedYear);



So, the question is again: Can I change values within the $result? I  
have no idea how the array (?) actually looks like...

Thanks for any suggestion,

Stef

-- 
Sent via pgsql-general mailing list (pgsql-general@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
 




 3 Posts in Topic:
pg_query & $result re-fill
stefan.schwarzer@[EMAIL P  2008-06-10 17:33:35 
Re: pg_query & $result re-fill
scott.marlowe@[EMAIL PROT  2008-06-10 13:13:09 
Re: pg_query & $result re-fill
stefan.schwarzer@[EMAIL P  2008-06-12 15:53:55 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 16:25:48 CST 2008.