Error in MySQL module

For the Compleat Fan
Locked
Jeff
Posts: 604
Joined: Sat Apr 07, 2007 2:23 pm
Location: Ohio
Contact:

Error in MySQL module

Post by Jeff »

In the function fetch-all, the uninitialized symbol 'all continues to collect results after multiple queries, stacking them subsequently.

To fix, change (define (fetch-all) to (define (fetch-all , all):

Code: Select all

(define (fetch-all , all)
  (dotimes (x (num-rows)) (push (fetch-row) all))
  (if all (reverse all) '()))
Jeff
=====
Old programmers don't die. They just parse on...

Artful code

Locked