Tomasz
|
| Posted: 04/21/2002, 12:54 PM |
|
$sum="SELECT COUNT(*) as record_selected FROM opinie";
$db->query($sum);
$how_many = $db->f("record_selected");
echo $how_many;
display nothing.
why?
|
|
|
 |
Alexey Alexapolsky
|
| Posted: 04/22/2002, 2:43 AM |
|
Your use of phplib functions is incorrect.
You didn't move resulset "pointer".
Should be
$sum="SELECT COUNT(*) as record_selected FROM opinie";
$db->query($sum);
if ($db->next_record()) {
$how_many = $db->f("record_selected");
echo $how_many;
}
--
Alex
CodeCharge Developer
"Tomasz" <tomasz@REMOVENOSPAMmax.pl> wrote in message
news:Xns91F7DEC06594Ctomasz@66.180.229.147...
> $sum="SELECT COUNT(*) as record_selected FROM opinie";
> $db->query($sum);
> $how_many = $db->f("record_selected");
> echo $how_many;
>
>
> display nothing.
> why?
|
|
|
 |
Tomasz
|
| Posted: 04/22/2002, 7:31 AM |
|
.... Zdaje się, że w Pn, 22 kwi 2002 09:37:19 GMT Alexey Alexapolsky
napisał (a):
> Your use of phplib functions is incorrect.
> You didn't move resulset "pointer".
> Should be
>
>
> $sum="SELECT COUNT(*) as record_selected FROM opinie";
> $db->query($sum);
>
> if ($db->next_record()) {
> $how_many = $db->f("record_selected");
> echo $how_many;
> }
>
thx Alex
|
|
|
 |
|