#25210 [Bgs]: Invalid resource when using query with derived tables

From: Date: Fri, 22 Aug 2003 17:04:09 +0000
Subject: #25210 [Bgs]: Invalid resource when using query with derived tables
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-46491@lists.php.net to get a copy of this message
ID: 25210 Updated by: georg@php.net Reported By: jack at vanzanen dot com Status: Bogus Bug Type: MySQL related Operating System: United Linux 1.0 PHP Version: 4.3.2 New Comment: Magnus, thats not a problem of ext/mysql or ext/mysqli. mysql_query returns false, if an error occured (as described in the manua!). Check your error with mysql_error or errno. Previous Comments: ------------------------------------------------------------------------ [2003-08-22 11:05:32] magnus@php.net Use the MySQLi extension which is available in PHP5, dunno about PHP4. ------------------------------------------------------------------------ [2003-08-22 09:29:17] jack at vanzanen dot com Description: ------------ I have installed MYSQL 4.1 with support for derived tables. If I query Mysql with a query that has a subquery in the from clause it works fine. If I now load this query in PHP I get invalid resource error. If I change the select for another select w/o the subquery it works fine (So my php script must be correct). I have tried PHP 4.3.2/4.3.3 & 5.0 TIA Jack Reproduce code: --------------- http://www.vanzanen.com/source.txt Expected result: ---------------- I expect the query to produce data that is shown on the screen as a html table Actual result: -------------- $result is not a valid resource ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25210&edit=1

« previous php.bugs (#46491) next »