Fixing a format bug
svn: r11303
This commit is contained in:
parent
dd870c3d30
commit
972128abf0
|
@ -35,7 +35,10 @@
|
|||
;; Queries for the post ids
|
||||
(define (blog-posts a-blog)
|
||||
(local [(define (row->post a-row)
|
||||
(make-post a-blog (string->number (vector-ref a-row 0))))
|
||||
(make-post
|
||||
a-blog
|
||||
(string->number
|
||||
(vector-ref a-row 0))))
|
||||
(define rows (sqlite:select
|
||||
(blog-db a-blog)
|
||||
"SELECT id FROM posts"))]
|
||||
|
@ -74,8 +77,9 @@
|
|||
(define rows
|
||||
(sqlite:select
|
||||
(blog-db (post-blog p))
|
||||
(format "SELECT content FROM comments WHERE pid = '~a'"
|
||||
(post-id p))))]
|
||||
(format
|
||||
"SELECT content FROM comments WHERE pid = '~a'"
|
||||
(post-id p))))]
|
||||
(cond
|
||||
[(empty? rows) empty]
|
||||
[else (map row->comment (rest rows))])))
|
||||
|
|
|
@ -1062,7 +1062,10 @@ The only function that creates posts is @scheme[blog-posts]:
|
|||
@code:comment{Queries for the post ids}
|
||||
(define (blog-posts a-blog)
|
||||
(local [(define (row->post a-row)
|
||||
(make-post a-blog (string->number (vector-ref a-row 0))))
|
||||
(make-post
|
||||
a-blog
|
||||
(string->number
|
||||
(vector-ref a-row 0))))
|
||||
(define rows (sqlite:select
|
||||
(blog-db a-blog)
|
||||
"SELECT id FROM posts"))]
|
||||
|
|
Loading…
Reference in New Issue
Block a user