Bug #80507 [Com]: Everything works great if I have this then all the tables if I have more issues

From: Date: Sat, 12 Dec 2020 23:17:14 +0000
Subject: Bug #80507 [Com]: Everything works great if I have this then all the tables if I have more issues
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231042@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80507&edit=1 ID: 80507 Comment by: sdsdsdsdsd at dfgfgfgfg dot net Reported by: greg-Wilson at shaw dot ca Summary: Everything works great if I have this then all the tables if I have more issues Status: Feedback Type: Bug Package: MySQLi related Operating System: 3.10.0-962.3.2.lve1.5.25.10.el7 PHP Version: 7.4.13 Block user comment: N Private report: N New Comment: foreach($username as $index => $value) what about print_r($username) looking at the codemess i bet this has nothing to do with the database at all Previous Comments: ------------------------------------------------------------------------ [2020-12-12 22:16:23] greg-wilson at shaw dot ca Here is the database code in SQL -- phpMyAdmin SQL Dump -- version 4.9.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Dec 12, 2020 at 05:08 PM -- Server version: 10.3.23-MariaDB-cll-lve -- PHP Version: 7.3.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: oerpn_members&Data -- -- -------------------------------------------------------- -- -- Table structure for table members -- CREATE TABLE members ( id mediumint(8) UNSIGNED NOT NULL, username varchar(20) NOT NULL, firstName varchar(30) NOT NULL, lastname varchar(30) NOT NULL, year smallint(4) UNSIGNED NOT NULL, month tinyint(2) UNSIGNED NOT NULL, day tinyint(2) UNSIGNED NOT NULL, email varchar(255) NOT NULL, password varchar(255) NOT NULL, region2id smallint(3) UNSIGNED NOT NULL, region2Name varchar(40) NOT NULL, region3id tinyint(2) UNSIGNED NOT NULL, region3Name varchar(40) NOT NULL, color1 tinyint(1) UNSIGNED NOT NULL, color2 tinyint(1) UNSIGNED NOT NULL, color3 tinyint(1) UNSIGNED NOT NULL, color4 tinyint(1) UNSIGNED NOT NULL, color5 tinyint(1) UNSIGNED NOT NULL, color6 tinyint(1) UNSIGNED NOT NULL, color7 tinyint(1) UNSIGNED NOT NULL, color8 tinyint(1) UNSIGNED NOT NULL, color9 tinyint(1) UNSIGNED NOT NULL, color10 tinyint(1) UNSIGNED NOT NULL, entryDate int(10) UNSIGNED NOT NULL, passwordDate int(10) UNSIGNED NOT NULL, lastVisit int(10) UNSIGNED NOT NULL, loginAttemptSuccessFull varchar(1) NOT NULL, attemptNum varchar(6) NOT NULL, secretKey int(10) UNSIGNED NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Indexes for dumped tables -- -- -- Indexes for table members -- ALTER TABLE members ADD PRIMARY KEY (id); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table members -- ALTER TABLE members MODIFY id mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; ------------------------------------------------------------------------ [2020-12-12 21:59:08] greg-wilson at shaw dot ca Yesterday I was testing if I could find a workaround for this issue. Issue occurred when I had 12 or more database tables. Today it's now 11 or more. ------------------------------------------------------------------------ [2020-12-12 08:57:59] requinix@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2020-12-12 08:52:01] greg-Wilson at shaw dot ca Description: ------------ If I have 12 database tables are more this is what happens. When I enter a number into the loop, I will always see less database entries then I am supposed to to see. If I run the program 10 times, I would never see same number of entries in the database, totally random. If I have less than 12 database tables everything works like this post to. Test script: --------------- https://www.oerpan.com/mysqli-bug.php Expected result: ---------------- If I enter 20,000 into loop I expect to see 20,000 database entries. Actual result: -------------- When I enter a number into the loop, I will always see a smaller number of database entries then I entered into the loop. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80507&edit=1

« previous php.bugs (#231042) next »