1

I have a problem with PDO returns incomplete result. Specific query executed in phpmyadmin returns 6000 rows. Same query executed by PDO returns only first 1160 rows. Seems like some kind of limitation or something. This setting

$pdo->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false); 

did not help.

Thx for answer

Edit

SELECT 
T1.`column1`,
MONTH( FROM_UNIXTIME( T1.`column2` ) ) AS month,
YEAR( FROM_UNIXTIME( T1.`column2` ) ) AS year, 
(SELECT CONCAT(T2.`column1`,';',T2.`column2`,';',T3.`column1`) FROM `table2` T2 WHERE     
T2.`column8` = T1.`column8` AND T2.`column1` LIKE '%new%') AS news,
(SELECT CONCAT(T2.`column1`,';',T2.`column2`,';',T3.`column1`) FROM `table2` T2 WHERE    
T2.`column8` = T1.`column8` AND T2.`column1` LIKE '%old%') AS oldies,
FROM table1 T1
LEFT JOIN table3 T3 ON T1.column9 = T3.column2
WHERE T1.`column2` > 1388534400

It will be one-time execution so optimalization not needed

Dwza
  • 6,494
  • 6
  • 41
  • 73
  • 1
    Can you post your query? – scrowler Nov 23 '14 at 21:39
  • This cannot be the query. There is a syntax error in this query. – Strawberry Nov 23 '14 at 22:01
  • Danke, just typing error when rewriting query here. – Miroslav Stopka Nov 23 '14 at 22:04
  • Danke is german ^^ that means thanks :) but how do you know there are 6k entrys selected... and how you see you only get 1160 ? Actually I think you have a to low set `max_input_vars` – Dwza Nov 23 '14 at 22:07
  • 6k = phpmyadmin, same query PDO while($row = $stmt->fetch()){...} = 1160. PDO can be affected by max_input_vars? – Miroslav Stopka Nov 23 '14 at 22:13
  • I had a issue that looked like this... see this accepted answere [POST DATA REDUCE](http://stackoverflow.com/questions/26234320/passing-array-via-jquerys-post-reduces-positions). Its about jquery in this case... but in the backend i select with pdo – Dwza Nov 23 '14 at 22:32
  • and yes, I think this can affect it becase it also takes memory and thats what max_input_vars is about :) – Dwza Nov 23 '14 at 22:39

1 Answers1

-1

Try increasing your max_input_vars to 10000 in your php.ini and see if anything changes.

At the moment it is 1000 i guess and may you run into memory errors.

Dwza
  • 6,494
  • 6
  • 41
  • 73