noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 06/12: SQL If nothing is loaded return false,


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 06/12: SQL If nothing is loaded return false, otherwise true
Date: Sat, 17 Sep 2022 08:40:57 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 65b82c0fc0a35cbe6f41c6b604fb372869d8a9c3
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Wed Sep 14 16:31:07 2022 +0200

    SQL If nothing is loaded return false, otherwise true
---
 include/lib/table_data_sql.class.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/lib/table_data_sql.class.php 
b/include/lib/table_data_sql.class.php
index a444f24dd..da1078f20 100644
--- a/include/lib/table_data_sql.class.php
+++ b/include/lib/table_data_sql.class.php
@@ -181,14 +181,14 @@ abstract class Table_Data_SQL extends Data_SQL
         // primary cannot be null or empty
         if (trim($this->$pk)==="" || $this->$pk===null)  {
             $this->pk=-1;
-            return;
+            return false;
         }
        
         $result=$this->cn->get_array($sql,array ($this->$pk));
         if ($this->cn->count()==0)
         {
             $this->$pk=-1;
-            return;
+            return true;
         }
 
         foreach ($result[0] as $key=> $value)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]