Always error:
[Email protected]:/opt# newlispnewlisp v.10.6.0 64-bit on Linux ipv4/6 UTF-8 libffi, options:newlisp-h> (load "/opt/m YSQL.LSP ") err:string expected in function import:libmysqlclient
It turns out that the path to the libmysqlclient.so installed under Ubuntu 12.04 is not normal, and find/-name to add the real path to the MYSQL.LSP file.
;;; Find the Libmysqlclient library on this system (SETF is-64-bit Nil) (Let (Paths ' ("/usr/lib/libmysqlclient.so" " /usr/lib/x86_64-linux-gnu/libmysqlclient.so ";; Here "/usr/lib64/mysql/libmysqlclient.so" "/usr/local/mysql/lib/libmysqlclient.dylib" " /opt/local/ Lib/libmysqlclient.dylib ""/sw/lib/libmysqlclient.dylib ")))
All right. Load Module Success:
> (Load "/OPT/MYSQL.LSP") MAIN
But connection database error. The original is not keeping up with the pace of Newllisp 10.6.0. Now get the latest test-tested code:
git clone https://gist.github.com/10490156.git
> (Load "/OPT/10490156/MYSQL.LSP") MAIN > _mysql:is-64-bit True > (setf db (Mysql)) (Mysql 10710960) > (: Connect db "localhost" "root" "770328" "MySQL") True > (: Query db "Show tables") (Mysqlresult 10812080) > (exit)
It seems to be available, in detail, and so on, after the author has tested.
http://www.newlispfanclub.alh.net/forum/viewtopic.php?f=16&t=4502
f=16&t=4502 ">
f=16&t=4502 ">http://www.artfulcode.net/articles/a-better-mysql-module-for-newlisp/
Error using artful MySQL module