Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
a4993247
Commit
a4993247
authored
28 years ago
by
Henrik (Grubba) Grubbström
Browse files
Options
Downloads
Patches
Plain Diff
Changed fetch_row() according to monty's suggestions.
Rev: src/modules/mysql/result.c:1.8
parent
be9c73a8
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/modules/mysql/result.c
+5
-15
5 additions, 15 deletions
src/modules/mysql/result.c
with
5 additions
and
15 deletions
src/modules/mysql/result.c
+
5
−
15
View file @
a4993247
/*
* $Id: result.c,v 1.
7
1997/01/08 15:
2
6:
22
grubba Exp $
* $Id: result.c,v 1.
8
1997/01/08 15:
3
6:
05
grubba Exp $
*
* mysql query result
*
...
...
@@ -62,7 +62,7 @@ typedef struct dynamic_buffer_s dynamic_buffer;
* Globals
*/
RCSID
(
"$Id: result.c,v 1.
7
1997/01/08 15:
2
6:
22
grubba Exp $"
);
RCSID
(
"$Id: result.c,v 1.
8
1997/01/08 15:
3
6:
05
grubba Exp $"
);
struct
program
*
mysql_result_program
=
NULL
;
...
...
@@ -297,25 +297,15 @@ static void f_seek(INT32 args)
/* int|array(string|int) fetch_row() */
static
void
f_fetch_row
(
INT32
args
)
{
/* Based on Mysql.xs
*/
int
num_fields
=
mysql_num_fields
(
PIKE_MYSQL_RES
->
result
);
MYSQL_ROW
row
=
mysql_fetch_row
(
PIKE_MYSQL_RES
->
result
);
pop_n_elems
(
args
);
if
(
row
)
{
int
num_fields
,
i
;
if
(
(
num_fields
>
0
)
&&
row
)
{
int
i
;
/* Mysql.xs does a mysql_field_seek(result, 0) here,
* but that seems to be a NOOP.
*/
if
((
num_fields
=
mysql_num_fields
(
PIKE_MYSQL_RES
->
result
))
<=
0
)
{
num_fields
=
1
;
}
for
(
i
=
0
;
i
<
num_fields
;
i
++
)
{
/* Mysql.xs does a mysql_fetch_field(result) here,
* but throws away the result.
*/
if
(
row
[
i
])
{
push_text
(
row
[
i
]);
}
else
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment