aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_category.inc.php
diff options
context:
space:
mode:
authornikrou <nikrou@piwigo.org>2009-11-20 14:17:04 +0000
committernikrou <nikrou@piwigo.org>2009-11-20 14:17:04 +0000
commit924dd262ec3778277cf1efedee92fa5dd4fb2d32 (patch)
tree05176413aa5b4762dd72477099644c732389f971 /include/functions_category.inc.php
parentc020cd0d7cb7710a6ffe04fc8b6d6ccfecb2c466 (diff)
Feature 1244 resolved
Replace all mysql functions in core code by ones independant of database engine Fix small php code synxtax : hash must be accessed with [ ] and not { }. git-svn-id: http://piwigo.org/svn/trunk@4325 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions_category.inc.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php
index dd2707b10..fb981fcbd 100644
--- a/include/functions_category.inc.php
+++ b/include/functions_category.inc.php
@@ -101,7 +101,7 @@ WHERE '.$where.'
$result = pwg_query($query);
$cats = array();
$selected_category = isset($page['category']) ? $page['category'] : null;
- while ($row = mysql_fetch_assoc($result))
+ while ($row = pwg_db_fetch_assoc($result))
{
$child_date_last = @$row['max_date_last']> @$row['date_last'];
$row = array_merge($row,
@@ -165,7 +165,7 @@ SELECT *
FROM '.CATEGORIES_TABLE.'
WHERE id = '.$id.'
;';
- $cat = mysql_fetch_assoc(pwg_query($query));
+ $cat = pwg_db_fetch_assoc(pwg_query($query));
if (empty($cat))
return null;
@@ -240,7 +240,7 @@ function get_local_dir( $category_id )
$query = 'SELECT uppercats';
$query.= ' FROM '.CATEGORIES_TABLE.' WHERE id = '.$category_id;
$query.= ';';
- $row = mysql_fetch_assoc( pwg_query( $query ) );
+ $row = pwg_db_fetch_assoc( pwg_query( $query ) );
$uppercats = $row['uppercats'];
}
@@ -251,7 +251,7 @@ function get_local_dir( $category_id )
$query.= ' FROM '.CATEGORIES_TABLE.' WHERE id IN ('.$uppercats.')';
$query.= ';';
$result = pwg_query( $query );
- while( $row = mysql_fetch_assoc( $result ) )
+ while( $row = pwg_db_fetch_assoc( $result ) )
{
$database_dirs[$row['id']] = $row['dir'];
}
@@ -275,7 +275,7 @@ SELECT galleries_url
WHERE s.id = c.site_id
AND c.id = '.$category_id.'
;';
- $row = mysql_fetch_assoc(pwg_query($query));
+ $row = pwg_db_fetch_assoc(pwg_query($query));
return $row['galleries_url'];
}
@@ -344,7 +344,7 @@ function display_select_cat_wrapper($query, $selecteds, $blockname,
$categories = array();
if (!empty($result))
{
- while ($row = mysql_fetch_assoc($result))
+ while ($row = pwg_db_fetch_assoc($result))
{
array_push($categories, $row);
}
@@ -384,7 +384,7 @@ SELECT DISTINCT(id)
$result = pwg_query($query);
$subcats = array();
- while ($row = mysql_fetch_assoc($result))
+ while ($row = pwg_db_fetch_assoc($result))
{
array_push($subcats, $row['id']);
}
@@ -533,7 +533,7 @@ WHERE
).'
LIMIT 1';
- $show_link = mysql_num_rows(pwg_query($query)) <> 0;
+ $show_link = pwg_db_num_rows(pwg_query($query)) <> 0;
}
}
if ($show_link)