aboutsummaryrefslogtreecommitdiffstats
path: root/install/db
diff options
context:
space:
mode:
authornikrou <nikrou@piwigo.org>2009-11-15 12:26:09 +0000
committernikrou <nikrou@piwigo.org>2009-11-15 12:26:09 +0000
commit1040cae2104259fdec8543e0a41ac63cbe24c69c (patch)
treef1a08573c7d2bdf1b8634263226fd42de7088848 /install/db
parentdda7f4571b72323c4e53ce5ef4a42412b65da3bd (diff)
Feature 1241 resolved. replace mysql_fetch_array by mysql_fetch_assoc for small php code improvements
git-svn-id: http://piwigo.org/svn/trunk@4265 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--install/db/12-database.php2
-rw-r--r--install/db/18-database.php2
-rw-r--r--install/db/19-database.php2
-rw-r--r--install/db/20-database.php2
-rw-r--r--install/db/65-database.php4
-rw-r--r--install/db/8-database.php2
-rw-r--r--install/db/9-database.php2
7 files changed, 8 insertions, 8 deletions
diff --git a/install/db/12-database.php b/install/db/12-database.php
index c48285e36..5ccadd324 100644
--- a/install/db/12-database.php
+++ b/install/db/12-database.php
@@ -66,7 +66,7 @@ $result = pwg_query($query);
$datas = array();
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
{
array_push(
$datas,
diff --git a/install/db/18-database.php b/install/db/18-database.php
index cd1f2a793..9843fb6af 100644
--- a/install/db/18-database.php
+++ b/install/db/18-database.php
@@ -47,7 +47,7 @@ $result = pwg_query($query);
$datas = array();
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
{
array_push(
$datas,
diff --git a/install/db/19-database.php b/install/db/19-database.php
index 4dfdf38d0..709e23bde 100644
--- a/install/db/19-database.php
+++ b/install/db/19-database.php
@@ -68,7 +68,7 @@ SELECT id, keywords
WHERE keywords IS NOT NULL
;';
$result = pwg_query($query);
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
{
foreach(preg_split('/[,]+/', $row['keywords']) as $keyword)
{
diff --git a/install/db/20-database.php b/install/db/20-database.php
index 25935f5de..9a29624b1 100644
--- a/install/db/20-database.php
+++ b/install/db/20-database.php
@@ -47,7 +47,7 @@ SELECT category_id, image_id
$result = pwg_query($query);
$datas = array();
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
{
array_push(
$datas,
diff --git a/install/db/65-database.php b/install/db/65-database.php
index 28988816c..b6a5a0a74 100644
--- a/install/db/65-database.php
+++ b/install/db/65-database.php
@@ -165,7 +165,7 @@ SELECT language FROM '.USER_INFOS_TABLE.'
$all_tables = array();
$query = 'SHOW TABLES LIKE "'.$prefixeTable.'%"';
$result = pwg_query($query);
- while ( $row=mysql_fetch_array($result) )
+ while ( $row=mysql_fetch_assoc($result) )
{
array_push($all_tables, $row[0]);
}
@@ -176,7 +176,7 @@ SELECT language FROM '.USER_INFOS_TABLE.'
$query = 'SHOW FULL COLUMNS FROM '.$table;
$result = pwg_query($query);
$field_definitions=array();
- while ( $row=mysql_fetch_array($result) )
+ while ( $row=mysql_fetch_assoc($result) )
{
if ( !isset($row['Collation']) or $row['Collation']=='NULL' )
continue;
diff --git a/install/db/8-database.php b/install/db/8-database.php
index 3f859a7e6..de742dcf7 100644
--- a/install/db/8-database.php
+++ b/install/db/8-database.php
@@ -60,7 +60,7 @@ $conf = $conf_save;
// +-Do I already have them in DB ?----------------------------------------+
$query = 'SELECT param FROM '.PREFIX_TABLE.'config';
$result = pwg_query($query);
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
{
unset( $params[ $row['param'] ] );
}
diff --git a/install/db/9-database.php b/install/db/9-database.php
index 6ce738e02..77f92c008 100644
--- a/install/db/9-database.php
+++ b/install/db/9-database.php
@@ -47,7 +47,7 @@ $result = pwg_query($query);
$datas = array();
-while ($row = mysql_fetch_array($result))
+while ($row = mysql_fetch_assoc($result))
{
array_push(
$datas,