|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2002-12-11 08:40 UTC] jonas at ionax dot se
 (FreeTDS 1.5 2002/08/24, MSSQL 7 (remote)) mssql_query causes when using the following SQLSTATEMENT "SELECT a.*, b.* FROM dbo.psl AS b LEFT JOIN dbo.prc AS a ON (a.idPSL = b.idPSL) WHERE b.OrderNo LIKE '%123169%' AND a.idPSL > '0'" while simple queries like "SELECT * FROM dbo.psl" works just fine. The problem appears only if the query tries to return information. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 23:00:01 2025 UTC | 
recompiled as cgi but still generates the same error. (gdb) bt #0 0x00000000 in ?? () #1 0x08094c14 in _mssql_fetch_batch (mssql_ptr=0x82658f4, result=0x82682d4, retvalue=-1) at /home/jonas/devel/php-4.3.0/ext/mssql/php_mssql.c:1020 #2 0x08095267 in zif_mssql_query (ht=2, return_value=0x827731c, this_ptr=0x0, return_value_used=1) at /home/jonas/devel/php-4.3.0/ext/mssql/php_mssql.c:1143 #3 0x08194083 in execute (op_array=0x8264864) at /home/jonas/devel/php-4.3.0/Zend/zend_execute.c:1596 #4 0x0818406a in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/jonas/devel/php-4.3.0/Zend/zend.c:864 #5 0x08153e05 in php_execute_script (primary_file=0xbfffe780) at /home/jonas/devel/php-4.3.0/main/main.c:1573 #6 0x0819a234 in main (argc=3, argv=0xbfffe834) at /home/jonas/devel/php-4.3.0/sapi/cgi/cgi_main.c:1424 #7 0x40238657 in __libc_start_main (main=0x8199878 <main>, argc=3, ubp_av=0xbfffe834, init=0x8067d2c <_init>, fini=0x819aa40 <_fini>, rtld_fini=0x4000dcd4 <_dl_fini>, stack_end=0xbfffe82c) at ../sysdeps/generic/libc-start.c:129It doesn't seemd to be a FreeTDS bug. I tested the tarball and CVS version of FreeTDS with sqsh (a command line client that use FreeTDS library, www.sqsh.org) and it worked fine. But, when I do a remote connect with PHP using the same FreeTDS library, it segfault when I do a simple: $res = mssql_query("select * from Test"); The connection and selection of the database works fine. That's all that I can say for now. Thanks for all. Ernesto