Quoting Bruce Butterfield <bab@...>:
> OK, I've updated mysql.i to include some helper functions which allow
> the following to work:
> (let ((conn (new-mysql)))
> (mysql-init conn)
> (mysql-connect conn "localhost" "bab" "foobar")
> (mysql-select-db "test")
> (mysql-query conn "select * from foo")
> (let* ((res (mysql-store-result conn))
> (nrows (mysql-num-rows res))
> (nfields (mysql-num-fields res)))
> (do ((i 0 (+ i 1)))
> ((= i nrows))
> (let ((row (mysql-fetch-row res)))
> (do ((j 0 (+ j 1)))
> ((= j nfields))
> (printf "~a " (mysql-get-field row j)))
> (printf "~n")))
> (mysql-free-result res))
> (mysql-close-connection conn))
> I think it will be pretty straightforward to coerce a Scheme vector from
> a Mysql row object but perhaps that's something that should be done in
> the level 0 interface instead.
> I haven't checked this in but it's attached so you can give it a shot.
Great. This is working for me, although I had to %ignore mysql_real_connect.
Also, mysql-close-connection is mysql-close for me.