Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - shanquan2006

#1
I study newLisp for two weeks. Now I was trying to  connect mysql to get "create table sql", but it cause messy code .

 

the code is :

 (:connect db mysql-host mysql-user mysql-pwd mysql-db mysql-port)
 (set 'r (:query db (append "show create table " mysql-table-name)))  
 (set 'mysql_sql ((((:fetch-all r) 0) 1) 1))  
 (println mysql_sql )

the result is :
CREATE TABLE `tvsn` (
                `order_id` varchar(13) NOT NULL COMMENT '??ID',
                `sn` varchar(50) NOT NULL COMMENT '??SN?'
               ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='???????SN?'

but in mysqlclient, the result is :


CREATE TABLE `tvsn` (
  `order_id` varchar(13) NOT NULL COMMENT '订单ID',
  `sn` varchar(50) NOT NULL COMMENT '电视SN码'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电视机SN码'        


some description of mysql.lsp  is:

;; @module Mysql

;; @author Jeff Ober <jeffober@gmail.com>, Kanen Flowers <kanendosei@gmail.com>

;; @version 1.05 beta

;; @location http://static.artfulcode.net/newlisp/mysql.lsp">http://static.artfulcode.net/newlisp/mysql.lsp

;; @package http://static.artfulcode.net/newlisp/mysql.qwerty">http://static.artfulcode.net/newlisp/mysql.qwerty

;; @description A new MySQL module to replace the distribution standard module (requires newlisp 10).



how to solve it ?