# Packets out of order. Error retrieving data from MariaDB

**URL:** <https://community.dreamfactory.com/t/packets-out-of-order-error-retrieving-data-from-mariadb/2851>\
**Category:** Connecting to SQL\
**Tags:** community\
**Created:** [June 15, 2016, 10:53am UTC](https://community.dreamfactory.com/t/packets-out-of-order-error-retrieving-data-from-mariadb/2851 "2016-06-15T10:53:21Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Martin\_Jansen](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@Martin\_Jansen](https://community.dreamfactory.com/u/Martin_Jansen)\
**Post date:** [August 31, 2017, 1:18pm UTC](https://community.dreamfactory.com/t/packets-out-of-order-error-retrieving-data-from-mariadb/2851/4 "2017-08-31T13:18:10Z")

</div>

Just to add to this, rather use a temp table with an auto-incrementing id field. Then you can use a while loop if you know the size of the table (select count(1) as numRecords from tbl\_x).

(Pseudo code)  
WHILE (i \<= numRecords)

i++;  
END

---

_[View the full topic](https://community.dreamfactory.com/t/packets-out-of-order-error-retrieving-data-from-mariadb/2851)._
