@@ -529,7 +529,7 @@ void php_odbc_fetch_attribs(INTERNAL_FUNCTION_PARAMETERS, int mode)
529
529
/* }}} */
530
530
531
531
/* {{{ odbc_bindcols */
532
- int odbc_bindcols (odbc_result * result )
532
+ void odbc_bindcols (odbc_result * result )
533
533
{
534
534
RETCODE rc ;
535
535
int i ;
@@ -645,7 +645,6 @@ int odbc_bindcols(odbc_result *result)
645
645
break ;
646
646
}
647
647
}
648
- return 1 ;
649
648
}
650
649
/* }}} */
651
650
@@ -855,10 +854,7 @@ PHP_FUNCTION(odbc_prepare)
855
854
SQLNumResultCols (result -> stmt , & (result -> numcols ));
856
855
857
856
if (result -> numcols > 0 ) {
858
- if (!odbc_bindcols (result )) {
859
- efree (result );
860
- RETURN_FALSE ;
861
- }
857
+ odbc_bindcols (result );
862
858
} else {
863
859
result -> values = NULL ;
864
860
}
@@ -1057,10 +1053,7 @@ PHP_FUNCTION(odbc_execute)
1057
1053
SQLNumResultCols (result -> stmt , & (result -> numcols ));
1058
1054
1059
1055
if (result -> numcols > 0 ) {
1060
- if (!odbc_bindcols (result )) {
1061
- efree (result );
1062
- RETVAL_FALSE ;
1063
- }
1056
+ odbc_bindcols (result );
1064
1057
} else {
1065
1058
result -> values = NULL ;
1066
1059
}
@@ -1253,10 +1246,7 @@ PHP_FUNCTION(odbc_exec)
1253
1246
1254
1247
/* For insert, update etc. cols == 0 */
1255
1248
if (result -> numcols > 0 ) {
1256
- if (!odbc_bindcols (result )) {
1257
- efree (result );
1258
- RETURN_FALSE ;
1259
- }
1249
+ odbc_bindcols (result );
1260
1250
} else {
1261
1251
result -> values = NULL ;
1262
1252
}
@@ -2383,10 +2373,7 @@ PHP_FUNCTION(odbc_next_result)
2383
2373
SQLNumResultCols (result -> stmt , & (result -> numcols ));
2384
2374
2385
2375
if (result -> numcols > 0 ) {
2386
- if (!odbc_bindcols (result )) {
2387
- efree (result );
2388
- RETVAL_FALSE ;
2389
- }
2376
+ odbc_bindcols (result );
2390
2377
} else {
2391
2378
result -> values = NULL ;
2392
2379
}
@@ -2752,10 +2739,7 @@ PHP_FUNCTION(odbc_tables)
2752
2739
SQLNumResultCols (result -> stmt , & (result -> numcols ));
2753
2740
2754
2741
if (result -> numcols > 0 ) {
2755
- if (!odbc_bindcols (result )) {
2756
- efree (result );
2757
- RETURN_FALSE ;
2758
- }
2742
+ odbc_bindcols (result );
2759
2743
} else {
2760
2744
result -> values = NULL ;
2761
2745
}
@@ -2822,10 +2806,7 @@ PHP_FUNCTION(odbc_columns)
2822
2806
SQLNumResultCols (result -> stmt , & (result -> numcols ));
2823
2807
2824
2808
if (result -> numcols > 0 ) {
2825
- if (!odbc_bindcols (result )) {
2826
- efree (result );
2827
- RETURN_FALSE ;
2828
- }
2809
+ odbc_bindcols (result );
2829
2810
} else {
2830
2811
result -> values = NULL ;
2831
2812
}
@@ -2886,10 +2867,7 @@ PHP_FUNCTION(odbc_columnprivileges)
2886
2867
SQLNumResultCols (result -> stmt , & (result -> numcols ));
2887
2868
2888
2869
if (result -> numcols > 0 ) {
2889
- if (!odbc_bindcols (result )) {
2890
- efree (result );
2891
- RETURN_FALSE ;
2892
- }
2870
+ odbc_bindcols (result );
2893
2871
} else {
2894
2872
result -> values = NULL ;
2895
2873
}
@@ -2965,10 +2943,7 @@ PHP_FUNCTION(odbc_foreignkeys)
2965
2943
SQLNumResultCols (result -> stmt , & (result -> numcols ));
2966
2944
2967
2945
if (result -> numcols > 0 ) {
2968
- if (!odbc_bindcols (result )) {
2969
- efree (result );
2970
- RETURN_FALSE ;
2971
- }
2946
+ odbc_bindcols (result );
2972
2947
} else {
2973
2948
result -> values = NULL ;
2974
2949
}
@@ -3026,10 +3001,7 @@ PHP_FUNCTION(odbc_gettypeinfo)
3026
3001
SQLNumResultCols (result -> stmt , & (result -> numcols ));
3027
3002
3028
3003
if (result -> numcols > 0 ) {
3029
- if (!odbc_bindcols (result )) {
3030
- efree (result );
3031
- RETURN_FALSE ;
3032
- }
3004
+ odbc_bindcols (result );
3033
3005
} else {
3034
3006
result -> values = NULL ;
3035
3007
}
@@ -3087,10 +3059,7 @@ PHP_FUNCTION(odbc_primarykeys)
3087
3059
SQLNumResultCols (result -> stmt , & (result -> numcols ));
3088
3060
3089
3061
if (result -> numcols > 0 ) {
3090
- if (!odbc_bindcols (result )) {
3091
- efree (result );
3092
- RETURN_FALSE ;
3093
- }
3062
+ odbc_bindcols (result );
3094
3063
} else {
3095
3064
result -> values = NULL ;
3096
3065
}
@@ -3151,10 +3120,7 @@ PHP_FUNCTION(odbc_procedurecolumns)
3151
3120
SQLNumResultCols (result -> stmt , & (result -> numcols ));
3152
3121
3153
3122
if (result -> numcols > 0 ) {
3154
- if (!odbc_bindcols (result )) {
3155
- efree (result );
3156
- RETURN_FALSE ;
3157
- }
3123
+ odbc_bindcols (result );
3158
3124
} else {
3159
3125
result -> values = NULL ;
3160
3126
}
@@ -3214,10 +3180,7 @@ PHP_FUNCTION(odbc_procedures)
3214
3180
SQLNumResultCols (result -> stmt , & (result -> numcols ));
3215
3181
3216
3182
if (result -> numcols > 0 ) {
3217
- if (!odbc_bindcols (result )) {
3218
- efree (result );
3219
- RETURN_FALSE ;
3220
- }
3183
+ odbc_bindcols (result );
3221
3184
} else {
3222
3185
result -> values = NULL ;
3223
3186
}
@@ -3285,10 +3248,7 @@ PHP_FUNCTION(odbc_specialcolumns)
3285
3248
SQLNumResultCols (result -> stmt , & (result -> numcols ));
3286
3249
3287
3250
if (result -> numcols > 0 ) {
3288
- if (!odbc_bindcols (result )) {
3289
- efree (result );
3290
- RETURN_FALSE ;
3291
- }
3251
+ odbc_bindcols (result );
3292
3252
} else {
3293
3253
result -> values = NULL ;
3294
3254
}
@@ -3354,10 +3314,7 @@ PHP_FUNCTION(odbc_statistics)
3354
3314
SQLNumResultCols (result -> stmt , & (result -> numcols ));
3355
3315
3356
3316
if (result -> numcols > 0 ) {
3357
- if (!odbc_bindcols (result )) {
3358
- efree (result );
3359
- RETURN_FALSE ;
3360
- }
3317
+ odbc_bindcols (result );
3361
3318
} else {
3362
3319
result -> values = NULL ;
3363
3320
}
@@ -3416,10 +3373,7 @@ PHP_FUNCTION(odbc_tableprivileges)
3416
3373
SQLNumResultCols (result -> stmt , & (result -> numcols ));
3417
3374
3418
3375
if (result -> numcols > 0 ) {
3419
- if (!odbc_bindcols (result )) {
3420
- efree (result );
3421
- RETURN_FALSE ;
3422
- }
3376
+ odbc_bindcols (result );
3423
3377
} else {
3424
3378
result -> values = NULL ;
3425
3379
}
0 commit comments