|
|
|
| вроде должно быть так, но ничего не выходит
include "config.php";
$start = $_GET["start"];
if (empty($start)) $start = 0;
if($start < 0) $start = 0;
$pnumber = 10;
$tot = mysql_query ( "select count(*) from posts;");
$total = mysql_fetch_array($tot);
$count = $total ['count (*)'];
echo "$count";
|
| |
|
|
|
|
|
|
|
для: bnf
(08.07.2006 в 01:17)
| | После строки
<?php
$tot = mysql_query ( "select count(*) from posts;");
?>
|
следует указать проверку
<?php
if(!$tot) exit(mysql_error());
?>
|
Теперь что-нибудь пишет? | |
|
|
|
|
|
|
|
для: bnf
(08.07.2006 в 01:17)
| | Должно быть так:
include "config.php";
$start = $_GET["start"];
if (empty($start)) $start = 0;
if($start < 0) $start = 0;
$pnumber = 10;
$tot = mysql_query ( "select count(*) from posts;");
$total = mysql_fetch_array($tot);
$count = $total [0];
echo "$count";
|
или так:
include "config.php";
$start = $_GET["start"];
if (empty($start)) $start = 0;
if($start < 0) $start = 0;
$pnumber = 10;
$tot = mysql_query ( "select count(*) as cnt from posts;");
$total = mysql_fetch_array($tot);
$count = $total ['cnt'];
echo "$count";
|
или так:
include "config.php";
$start = $_GET["start"];
if (empty($start)) $start = 0;
if($start < 0) $start = 0;
$pnumber = 10;
$tot = mysql_query ( "select count(*) from posts;");
$count = mysql_result($tot, 0);
echo "$count";
|
| |
|
|
|
|
|
|
|
для: Trianon
(08.07.2006 в 16:29)
| | Пасиба | |
|
|
|