Jump to content

shades

Members
  • Content Count

    40
  • Joined

  • Last visited

Community Reputation

0 Neutral

About shades

  • Rank
    Member
  1. No. And yes even changing it in php file did not do the trick i actually had to json stringify while passing through AJAX and then had to decode it on my php file.
  2. Ok i found out the issue when i pass the array using ajax it shows 4800, when i do a count on the received array it only shows 2500. So, I finally found the culprit it was in php.ini file. ; How many GET/POST/COOKIE input variables may be accepted max_input_vars = 2500 damn.
  3. Yea got it working partially now, the delete happens within few milliseconds, but I am not understanding why it deletes only 2500 rows. Is there any setting which I need to change? I did try executing the query with all 4800 ids directly using MySQL workbench and all rows were deleted. So, I feel there is something from the client side which is limiting this.
  4. I got the data table with primary key as a running number and when I display data to the user I pick these ids as well. So when the user checks the boxes the id's get picked and all id's are stored in the id array. So this delete query is used to delete the rows with matching id's. Sorry, my English ain't good so I understood your first question in a different way.
  5. It is a table which displays those rows and user has checkboxes against each row and also a select all option so if they select all rows are selected, so in my example, i had 4800 rows
  6. Hi Guys, I have a form where the user can select rows and delete them. But my problem is when I select around 4800 rows to delete it takes too long and also only 2500 rows get deleted. So, could someone help me with the below code so it does not take more time and also deletes all the rows? Note: 1. I use InnoDB 2. I use ajax with async set to false <?php include("dbconnect.php"); ini_set ( 'max_execution_time', 20000); if(isset($_POST['id'])){ foreach ($_POST['id'] as $ids) { $stmt = $dbconnect->prepare("DELETE FROM datatable WHERE id=:id"); $stm
  7. Hi Guys, I ran the below code on my laptop and it was working fine and I used Chrome and WAMP for the development. But when I uploaded the file on the server and tested it gave the below error. I tried including ob_start(), and ob_end_flush(); but it did not work, so could someone point out the mistake in code?? Error: Cannot modify header information - headers already sent by index.php Code: <div class="maincolumnheader"> <span class="btn btn-primary">Groups</span> <Span><img src="/images/arrow.jpg" cla
  8. Right now I am using the below db connection. PHP version is 5.6 $host = ''; $db = ''; $user = ''; $pass = ''; $charset = 'utf8mb4'; $dsn = "mysql:host=$host;dbname=$db;charset=$charset"; $opt = [ PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_EMULATE_PREPARES => false, ]; $dbconnect = new PDO($dsn, $user, $pass, $opt); So, i guess it should work if i change to utf8, but i did change and check the below string: ~ @ ! # $ % ^ & * ( ) _ + } { " | \ /.,\ ?>|": but in my CSV file it sh
  9. Hi, I got a string with special characters and in the table when i see the text, all the texts are inserted properly with the special characters. But when I use the below code to generate CSV file, for few of the special characters like - , ' and ... it displays –, ’ and …. So could someone guide me what changed I have to do in order to get the characters get displayed properly in my CSV file ? <?php include("dbconnect.php"); if(isset($_POST['groupname'], $_POST['decks'], $_POST['rows'])){ $groupname = $_POST['groupname']; $decks = $_POST['decks']; $rows = $
  10. Hi, Sorry for reposting on this question. With reference to your solution, could you please explain me what exactly is happening in the below condition ? I understood the following code but this, I am not able to understand. if (!$tail) { return array_map(function ($item) { return [$item]; }, $head); } Thanks
  11. Hi, I am running the PHP server on my laptop. So, far I am able to create a zip file and extract too, but when i extract i gave path to my c:/ folder.The issue is it extracts to the C:/ folder on my laptop where the php server is running and if a user extracts from a different machine I don't think it will extract to the client C:/folder or does it ? or is there any other way to specify the client path ? Also client can use linux system then i cannot use this path. So, I would like to know is there any way to achieve this ? Note: I have multiple CSV files which i have zipped and It
  12. Okay. Understood as my export page is part of my Index page, the contents of index page were getting dumped. So to resolve this i pointed my export to a standalone page and now the download to csv is working perfect. I also read from another forum that "I cannot spit out multiple files on the fly for download. That's a limitation of the http protocol and PHP can not work around that unless I save multiple files to the disk and then either zip them and offer the zip file OR use a series of header redirects to grab the files in sequential order." So, I guess I got no other option than to
  13. Using your solution, when i export, it is exporting as index.php and not as csv file.. Why is that ??
  14. Thanks for information. Yes, I actually need no formatting and multiple sheets. I found out that the application can only supports CSV file format. The main requirement is not just exporting into multiple files. User later selects one of the generated files into their application. So, if i generate it into an archive then again i have to unpack and provide it to them for selection. So, could you please tell me if this is the only way I could do it ? Or is their any other way to do it ? Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.