Jump to content

PHP and postgresql array help please


n3w8ie

Recommended Posts

Hey guys, I'm new here so please be gentle with me!

 

I have this php command referencing my postgresql db at present:

 

'Select'=>$this->MyTable->GetAllSQLSelectFieldNames(array('perc'=>'((firstnumber)::float)/((secondnumber)::float) as perc')),

 

It is possible for firstnumber to be greater than secondnumber, but I'd like to limit the array output to 1 - ie to represent that firstnumber is greater than or equal to secondnumber without ever returning a number greater than 1.

 

Can anyone point me in the right direction for this please?

Link to comment
https://forums.phpfreaks.com/topic/216023-php-and-postgresql-array-help-please/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.