Yangi formatda davom etish uchun: https://uzfor.net/view.php?act=post&id=36929
Postga havola
MrShahzodbek [1027] [off]
Shuni PDOga moslab beringlar, sal tushunib olish uchun?
6 daqiqa 33 soniyadan keyin yozdi:
Shu to'grimi?
$db->Query("SELECT COUNT(*) FROM db_users_a WHERE user = '$login'"); if($db->FetchRow() == 0){ # Foydalanuvchini ro`yhatga olamiz $db->Query("INSERT INTO db_users_a (user, email, pass, referer, referer_id, date_reg, ip) VALUES ('$login','{$email}','$md5pass','$referer_name','$referer_id','$time',INET_ATON('$ip'))"); $lid = $db->LastInsert(); # BONUS belgilaymiz $db->Query("INSERT INTO db_users_b (id, user, money_b, money_p, last_sbor) VALUES ('$lid','$login','1009', '1009', '".time()."')"); # Statistikani yangilaymiz $db->Query("UPDATE db_stats SET all_users = all_users +1 WHERE id = '1'");
Shuni PDOga moslab beringlar, sal tushunib olish uchun?
6 daqiqa 33 soniyadan keyin yozdi:
# Statistikani yangilaymiz $sql = "UPDATE db_stats SET all_users=? WHERE id=1"; $stmt= $dpo->prepare($sql); $stmt->execute([$all_users+1]);
Shu to'grimi?