Skip to content

Commit

Permalink
MySQL: Reset data fetching for FetchRows
Browse files Browse the repository at this point in the history
  • Loading branch information
Iswenzz committed Mar 25, 2021
1 parent 4c8d378 commit c2baba4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/data/mysql.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,10 @@ void MySQL_FetchRowsInternal(qboolean all, qboolean stringIndexed)
if (instance.resultStmt)
{
if (all)
{
Plugin_Scr_MakeArray();
mysql_stmt_data_seek(instance.stmt, 0);
}
while (!mysql_stmt_fetch(instance.stmt))
{
mysql_field_seek(instance.resultStmt, 0);
Expand Down Expand Up @@ -507,7 +510,10 @@ void MySQL_FetchRowsInternal(qboolean all, qboolean stringIndexed)
unsigned int num_fields = mysql_num_fields(instance.result);

if (all)
{
Plugin_Scr_MakeArray();
mysql_data_seek(instance.result, 0);
}
while ((row = mysql_fetch_row(instance.result)) != NULL)
{
Plugin_Scr_MakeArray();
Expand Down

0 comments on commit c2baba4

Please sign in to comment.