|
|
|
| для вывода аваторки в 5 версии..
мне нужно вывести два поля themes, statuser из таблицы authors
для этого в файле read.php, я изменил запрос:
$query = "SELECT *, $tbl_authors.id_author, $tbl_authors.statuser, $tbl_authors.themes FROM $tbl_posts, $tbl_authors
WHERE $tbl_posts.id_theme = $id_theme AND
hide != 'hide' AND $tbl_authors.id_author = $tbl_posts.id_author
ORDER BY $tbl_posts.time";
|
добавил поля
while($posts = mysql_fetch_array($pst))
{
$post_arr[$posts['id_post']]['name'] = $posts['name'];
$post_arr[$posts['id_post']]['url'] = $posts['url'];
$post_arr[$posts['id_post']]['putfile'] = $posts['putfile'];
$post_arr[$posts['id_post']]['author'] = $posts['author'];
$post_arr[$posts['id_post']]['id_author'] = $posts['id_author'];
$post_arr[$posts['id_post']]['hide'] = $posts['hide'];
$post_arr[$posts['id_post']]['time'] = $posts['time'];
$post_arr[$posts['id_post']]['statuser'] = $posts['statuser'];
$post_arr[$posts['id_post']]['themes'] = $posts['themes'];
$post_arr[$posts['id_post']]['parent_post'] = $posts['parent_post'];
$post_par[$posts['parent_post']][]= $posts['id_post'];
}
|
а в файле utils.posts.php для функции добавил два поля
function post_down_arr($id_post,
$id_theme,
$indent,
$last_time,
$current_author,
$id_forum,
$id_author,
$author,
$time,
$statuser,
$themes,
$file,
$name,
$puturl,
$skin,
$themehide,
$parent_author,
$parent_time,
$parent_id_author,
$count_answer,
$post_time)
|
Но при выводе сообщений мне выдает следующие ошибки:
Warning: Missing argument 20 for post_down_arr(), called in Z:\home\com\utils\utils.posts.php on line 351 and defined in Z:\home\com\utils\utils.posts.php on line 399
Warning: Missing argument 21 for post_down_arr(), called in Z:\home\com\utils\utils.posts.php on line 351 and defined in Z:\home\com\utils\utils.posts.php on line 400
не могу найти причину?? | |
|
|
|
|
|
|
|
для: Dred
(21.12.2009 в 09:04)
| | Сама функция изменена, и с ней все окей.
Не знаю точно как пояснить, и как это называется ...
Когда функции выполняется ( post_down_arr(...); ) и внее поставляются все значения... туда и необходимо вписать еще две переменных, с учетом расположения их среди остальных...
Лучше новые аргументы вписывай в конец, не запутаешься в их расположении. | |
|
|
|