Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
prolog在web中显示多个mysql记录_Mysql_Web_Prolog - Fatal编程技术网

prolog在web中显示多个mysql记录

prolog在web中显示多个mysql记录,mysql,web,prolog,Mysql,Web,Prolog,对不起我的英语。我想创建一个简单的网站,从mysql数据库中获取数据并显示在页面上。我有一个问题:如何在web上显示多个mysql记录?此代码仅显示第一条记录。 ... 选择可输入、Id、物种、胸径、 repeat, format('<pre>', []), %swritef(S,'SELECT * FROM %t', [Table]), %prep(S, [] , row(Id, Species,Dbh) , []), write('I

对不起我的英语。我想创建一个简单的网站,从mysql数据库中获取数据并显示在页面上。我有一个问题:如何在web上显示多个mysql记录?此代码仅显示第一条记录。 ... 选择可输入、Id、物种、胸径、

    repeat,

    format('<pre>', []),

    %swritef(S,'SELECT * FROM %t', [Table]),
    %prep(S, [] , row(Id, Species,Dbh) , []),

    write('Id = '),writeln(Id),
    write('Species = '),writeln(Species),
    write('Dbh = '),writeln(Dbh),

    format('</pre>', []),

终于得到了它-它按行显示。。。 但是如何按列名显示?

可能重复
   fetch(Q):-
    odbc_fetch(Q, Row, []),
    (   Row == end_of_file
    ->  true
    ;   writeln(Row),
        fetch(Q)
    ).