[kpax-devel] SQL question

Nico Garcia Belmonte philogb at gmail.com
Fri Feb 16 18:11:14 UTC 2007


Hi, I'm using SBCL + KPAX + CLSQL + MYSQL and I have a problem with my lisp
files:

if I define a file like this:

(in-package :kpax-user)
(defwebapp :q_main
(:index 'q_main-index)
(:unsecure t))


(defun q_main-index (request-response)
(in-package :clsql-user)
(html-part (out request-response)
(:div
(clsql:connect '("localhost" "quotes" "root" "pass") :if-exists :new
:database-type :mysql)
(clsql:do-query ((user) "select USERNAME from USER")
(fmt "<p>~A</p>" user)))))

I get a page listing all users for my USER table.

Now I'm trying to combine lsp's with clsql code getting an lisp page similar
to the lsp.lisp example and a q_index.lsp that has:

...

<div class="indexTable" align="center">
<br /><br />
<%
(in-package :clsql-user)
(html-part (out request-response)
(:div :class "indexTable" :align "center")
(clsql:connect '("localhost" "quotes" "root" "") :if-exists :new
:database-type :mysql)
(clsql:do-query ((user) "select USERNAME from USER")
(fmt "<p>~A</p>" user)))
%>

...

I'm getting an error:

;; S-HTTP-SERVER: [1] Handling #<S-HTTP-SERVER:HTTP-REQUEST GET
"/kpax/dynamic/lsp/show-lsp/q_index" {B370D11}>
;; S-HTTP-SERVER: Running KPAX s-http-server-handler
;; KPAX 20070216T180518 INFO handling /kpax/dynamic/lsp/show-lsp/q_index
;; KPAX 20070216T180518 INFO created new session 2PQCITWJPIRUX
[12863637235009421961]
;; KPAX 20070216T180518 ERROR error deleting unreachable code

debugger invoked on a CODE-DELETION-NOTE in thread
#<THREAD "connection-handler-1" {AA6F001}>:
deleting unreachable code

any help?



-- 
I would never die for my beliefs because I might be wrong.

Bertrand Russell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/kpax-devel/attachments/20070216/2088318b/attachment.html>


More information about the kpax-devel mailing list