Code Monkey home page Code Monkey logo

Comments (3)

bearlord avatar bearlord commented on June 5, 2024

报的警告,应该是编译通过了。你用的什么系统,我复现一下,稍后做好兼容。

from pdo_taos.

xiejunyu avatar xiejunyu commented on June 5, 2024

gcc 9.4.0
Ubuntu 20.04.1
php 7.4.28
编译是通过了,
fetchAll查询出来的时间中间被截掉了,不知道是不是编译报的警告导致的,麻烦你啦
[ts] => 2022-07-0:06.000

from pdo_taos.

bearlord avatar bearlord commented on June 5, 2024

我这编译警告,但是不会查询出错。 你可以 php-fpm 和 cli 都测试下,看是否都报错了。
如果还有报错,请把测试的数据表结构发一下。


root@ubuntu20:/home/bear/documents# cat /etc/issue
Ubuntu 20.04.4 LTS \n \l
root@ubuntu20:/home/bear/documents# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) 
root@ubuntu20:/home/bear/documents# php -v
PHP 7.4.3 (cli) (built: Jun 13 2022 13:43:30) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies
root@ubuntu20:/home/bear/documents# php --ri pdo_taos

pdo_taos

PDO Driver for TDengine => enabled
TDengine(libtaos) Version  => 2.6.0.6
root@ubuntu20:/home/bear/documents# cat pdo_taos_3.php 
<?php

$t1 = microtime(true);

$dbh = new PDO("taos:host=127.0.0.1", "root", "taosdata"); 
$stmt = $dbh->query("select * from demo.t1 LIMIT 3 OFFSET 0");

$all = $stmt->fetchAll(PDO::FETCH_ASSOC);

print_r($all);

$t2 = microtime(true);

echo "run time: ". ($t2 - $t1) . "\n";
        
?>
root@ubuntu20:/home/bear/documents# php pdo_taos_3.php 
Array
(
    [0] => Array
        (
            [ts] => 2022-07-01 15:25:17.933
            [v_int] => 1
        )

)
run time: 0.0094621181488037

from pdo_taos.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.