Yangi formatda davom etish uchun: https://uzfor.net/view.php?act=post&id=80486
Postga havola
Tayota [667] [off]
ZET-PRO2003, # ZET-PRO2003 (10.03.2020 / 17:11)
salom dostlar! Bitta yordam kerak, yani bitta mysql-ga sorovda eng songi sorovdan avvalgisini foydalanish kerak.
Masalan: mysql-ga id 8 sorov borgan bolsa, man id 8 dan avvalgi yani id 7 mysql sorovn$nechta = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `ustun_nomi`"),0);
if ($nechta > 1) {
$id = $nechta - 1;
} else {
$id = $nechta;
}
echo $id;
salom dostlar! Bitta yordam kerak, yani bitta mysql-ga sorovda eng songi sorovdan avvalgisini foydalanish kerak.
Masalan: mysql-ga id 8 sorov borgan bolsa, man id 8 dan avvalgi yani id 7 mysql sorovn$nechta = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `ustun_nomi`"),0);
if ($nechta > 1) {
$id = $nechta - 1;
} else {
$id = $nechta;
}
echo $id;