Search Postgresql Archives

pg_query & $result re-fill

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux