Author: danydb
Date: 2011-11-10 22:29:44 +0100 (Thu, 10 Nov 2011)
New Revision: 4336
Modified:
phpcompta/trunk/include/class_database.php
Log:
Formatage + chgt make_array
Modified: phpcompta/trunk/include/class_database.php
===================================================================
--- phpcompta/trunk/include/class_database.php 2011-11-10 21:28:35 UTC (rev
4335)
+++ phpcompta/trunk/include/class_database.php 2011-11-10 21:29:44 UTC (rev
4336)
@@ -75,7 +75,7 @@
if ( $a == false )
{
- if (DEBUG)
+ if (DEBUG)
{
ob_end_clean();
echo '<h2 class="error">Impossible de se connecter à
postgreSql !</h2>';
@@ -91,7 +91,7 @@
exit ("Connection impossible : vérifiez vos
paramètres de base
de données");
}
- else
+ else
{
echo '<h2 class="error">Erreur de connexion !</h2>';
}
@@ -122,20 +122,20 @@
{
try
{
-
+
$this->sql=$p_string;
$this->array=$p_array;
if ( $p_array==null )
{
- if ( ! DEBUG )
+ if ( ! DEBUG )
$this->ret=pg_query($this->db,$p_string);
else
$this->ret=@pg_query($this->db,$p_string);
}
else
{
- if ( ! DEBUG )
+ if ( ! DEBUG )
$this->ret=pg_query_params($this->db,$p_string,$p_array);
else
$this->ret=@pg_query_params($this->db,$p_string,$p_array);
@@ -542,7 +542,7 @@
else return false;
}
/*
- *!\brief test if a view exist
+ *!\brief test if a view exist
* \return true if the view. exist otherwise false
*/
function exist_view($p_name)
@@ -553,7 +553,7 @@
return true;
}
/*
- *!\brief test if a schema exists
+ *!\brief test if a schema exists
* \return true if the schemas exists otherwise false
*/
function exist_schema($p_name)
@@ -630,7 +630,7 @@
{
$a=$this->exec_sql($p_sql);
$max=pg_NumRows($a);
- if ( $max==0) return null;
+ if ( $max==0 && $p_null==0) return null;
for ($i=0;$i<$max;$i++)
{
$row=pg_fetch_row($a);
_______________________________________________
Phpcompta-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/phpcompta-dev