Fix some sql issues :
- permalink that use if() syntax - add tables themes for other database engines that mysql git-svn-id: http://piwigo.org/svn/trunk@5192 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
6b296b293d
commit
4c461f36b1
6 changed files with 51 additions and 6 deletions
|
|
@ -98,8 +98,8 @@ elseif ( isset($_GET['delete_permanent']) and !is_adviser() )
|
|||
DELETE FROM '.OLD_PERMALINKS_TABLE.'
|
||||
WHERE permalink="'.$_GET['delete_permanent'].'"
|
||||
LIMIT 1';
|
||||
pwg_query($query);
|
||||
if (pwg_db_affected_rows()==0)
|
||||
$result = pwg_query($query);
|
||||
if (pwg_db_changes($result)==0)
|
||||
array_push($page['errors'], l10n('Cannot delete the old permalink !'));
|
||||
}
|
||||
|
||||
|
|
@ -108,8 +108,8 @@ $template->set_filename('permalinks', 'permalinks.tpl' );
|
|||
|
||||
$query = '
|
||||
SELECT
|
||||
id,
|
||||
'.pwg_db_concat(array('id', '\' - \'', 'name', 'IF(permalink IS NULL, \'\', \' √\')')).' AS name,
|
||||
id, permalink,
|
||||
'.pwg_db_concat(array('id', '\' - \'', 'name')).' AS name,
|
||||
uppercats, global_rank
|
||||
FROM '.CATEGORIES_TABLE;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue