Postgresql 12 compatibility

This commit is contained in:
sparkyx 2026-02-27 14:41:52 +01:00
parent 43c067fc2d
commit ce691ca8e5
2 changed files with 3 additions and 3 deletions

View file

@ -12,7 +12,7 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*²
* You should have received a copy of the GNU General Public License
* along with NOALYSS; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -39,7 +39,7 @@ if ( ! $g_user->is_double_identified()) {
exit();
}
$g_user->check_dossier($http->get('gDossier'));
$res=$cn->exec_sql("select distinct code,coalesce(description,code) description from get_profile_menu($1) where code ~* $2 or description ~* $2 order by code limit 5 ",array($g_user->get_profile(),$http->post("acs")));
$res=$cn->exec_sql("select distinct code,coalesce(description,code) as description from get_profile_menu($1) where code ~* $2 or description ~* $2 order by code limit 5 ",array($g_user->get_profile(),$http->post("acs")));
$nb=Database::num_row($res);
echo "<ul>";
set_language();

View file

@ -210,7 +210,7 @@ class Card_Property
}
if ( $this->ad_id == ATTR_DEF_QUANTITY_TYPE){
$result['input']=new IText( "av_text" . $this->ad_id,$this->av_text);
$array=$this->cn->get_array("select qc_code,format('%s %s',qc_code,qc_label) label from quantity_code_ref order by qc_label",p_mode: PGSQL_NUM);
$array=$this->cn->get_array("select qc_code,format('%s %s',qc_code,qc_label) as label from quantity_code_ref order by qc_label",p_mode: PGSQL_NUM);
$result['input']->set_datalist($array);
$result['label']=$this->ad_text;
return $result;