X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=db.php;h=4a58db863a280bcfc9ffe1edd852b34586527360;hb=608ecf965408645758cdca1e5f01ff5ac3eff166;hp=9390035af5044822004aa9195648dcaddd7b304d;hpb=883f464e943d1588c0c4227d7f6e69dedb7b6a21;p=wfpl.git diff --git a/db.php b/db.php index 9390035..4a58db8 100644 --- a/db.php +++ b/db.php @@ -2,21 +2,18 @@ # Copyright (C) 2006 Jason Woofenden # -# This file is part of wfpl. -# -# wfpl is free software; you can redistribute it and/or modify it under the -# terms of the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 2.1 of the License, or (at your option) -# any later version. -# -# wfpl is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -# more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with wfpl; if not, write to the Free Software Foundation, Inc., 51 -# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . require_once('code/wfpl/encode.php'); @@ -212,7 +209,9 @@ function db_get_value($table, $columns, $where = '') { } function db_count($table, $where = '') { - return db_get_value($table, 'count(*)', $where); + $args = func_get_args(); + array_splice($args, 1, 0, array('count(*)')); + return call_user_func_array('db_get_value', $args); } # call either of these ways: