Page 2 of 2

Re: SBCL & MySQL (clsql, cffi)

Posted: Wed Dec 15, 2010 1:29 pm
by erazer
Ramarren wrote: The documentation on the very page you linked appears reasonably clear. What is it that you don't understand about it?
I'm just absolutely fool in Lisp. C++, c, php etc. - this is with I'm working. This is 2nd day I'm trying to be a friends with Lisp :)

What about I don't understand - I'm just need the simple clear example on how to make select query and print the result. As I'm very newby in Lisp, it is so hard to me to understand on how to do some things right way even if I have "reasonably clear" project's page :)

So, I would be very thankful if someone can help me a liitle with this question.

Thank you.

Re: SBCL & MySQL (clsql, cffi)

Posted: Wed Dec 15, 2010 1:39 pm
by ramarren
I would recommend not trying to use a database on the second day of using Lisp. Or at least not MySQL. SQlite is generally simpler.

Still, I don't really see what in "If :store is NIL query returns the allocated connection object. You should
use next-result-set and next-row to step through the results." is particularly Lisp specific. And if you change ":store nil" to ":store t" the results will be returned as a list directly.

Re: SBCL & MySQL (clsql, cffi)

Posted: Wed Dec 15, 2010 4:13 pm
by vanekl
? (with-rows (row "select * from db ")(format t "record: ~s~%" row))
record: ("%" "test" NIL "Y" "Y" "Y" "Y" "Y" "Y" "N" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "N" "N")
record: ("%" "test\\_%" NIL "Y" "Y" "Y" "Y" "Y" "Y" "N" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "N" "N")
NIL
?

Re: SBCL & MySQL (clsql, cffi)

Posted: Thu Dec 16, 2010 2:42 am
by erazer
hoooh!...

I'm just going crazy. It was a some strange problem with mysql server.

Everything is works fine now.

Thanks to everybody very much!